musiKk / plyj

A Java parser written in Python using PLY.
Other
150 stars 69 forks source link

Makes `import plyj`'s result more natural. #9

Closed pradyunsg closed 9 years ago

pradyunsg commented 11 years ago

The added imports make parser and model available from import plyj and use plyj.parser without having to import it from specifically. It is only more natural that import behaves this way.

pradyunsg commented 11 years ago

The build didn't fail because of the change AFAIK, it failed due to other reasons.

pradyunsg commented 9 years ago

Ping!

musiKk commented 9 years ago

Well, pong.

Tests are still failing and I'm not sure what the added value is. Could you provide examples that show what the difference for the user is?

pradyunsg commented 9 years ago

Well, they can access model and parser with a single import, through plyj.

This change means you can do:

import plyj
plyj.parser, plyj.model

in place of

import plyj.model
import plyj.parser
plyj.parser, plyj.model

One can put the imports on the same line and make linters shout about it then silence them. But really, that can be overcome by adding this one line.

As to why have the plyj. stuff, it allows one to more easily track where something is coming from.

Regarding the failing build, I had forked from a point the build was broken already... And I also deleted the fork in a cleanup of my account I was doing... A git pull --rebase github.com/musiKk/plyj in my fork would have fixed the failing build...

That's all.

pradyunsg commented 9 years ago

Bump.