Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Peter Schuller
look at the suggested practice of modifying __module__. For this particular use case we probably won't end up doing that, but it may come to be useful in the future. -- / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller <[EMAIL PROTECTED]>' Key retrieval: Send an E-Mai

Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Peter Schuller
> Well, all I will say is that many people on this list, myself > included, do know Python internals, and we use the method we've been > suggesting here, without problems. Ok. That is useful to know (that it is being done in practice without problems). Thanks! -- / Peter Schull

Re: Module/package hierarchy and its separation from file structure

2008-01-30 Thread Peter Schuller
an alternative that mitigates the problem. And it *is* hacky, in my opinion, if things break as a result of it (such as the other poster's inspect example). -- / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller <[EMAIL PROTECTED]>' Key retrieval: Send an E-Mail to [EMAIL PROTECTED] E-Mail: [EMAIL PROTECTED] Web: http://www.scode.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Module/package hierarchy and its separation from file structure

2008-01-29 Thread Peter Schuller
and related machinery. -- / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller <[EMAIL PROTECTED]>' Key retrieval: Send an E-Mail to [EMAIL PROTECTED] E-Mail: [EMAIL PROTECTED] Web: http://www.scode.org -- http://mail.python.org/mailman/listinfo/python-list

Re: Module/package hierarchy and its separation from file structure

2008-01-29 Thread Peter Schuller
ty problem. The class won't actually *BE* org.lib.animal.Monkey. Perhaps manipulating __module__ is enough; perhaps not (for example, what about sys.modules?). Looks like I'll just live with putting more than I would like in the same file. -- / Peter Schuller PGP userID: 0xE9758B7D o

Re: Module/package hierarchy and its separation from file structure

2008-01-24 Thread Peter Schuller
lot of code hiding behind the public interface of a module). So essentially, Java and Python have the same problem, but certain aspects of Java happens to mitigate the effects of it. Languages like Ruby do not have the problem at all, because the relationship between files and modules is non-existen

Re: Module/package hierarchy and its separation from file structure

2008-01-23 Thread Peter Schuller
verything related to a class in the same file. The problem is that with Python, everything is not a classes, and a file translates to a module, not a class. So you cannot have your source in different files without introducing as many packages as you introduce files. -- / Peter Schuller PGP u

Module/package hierarchy and its separation from file structure

2008-01-23 Thread Peter Schuller
imals as applies to org.lib.animal in the above example. [2] Ignoring for now that it may not be realistic that every animal implementation would be that long; in many cases a lot of code would be in common. But feel free to substitude for something else (a Zoo say). -- / Peter Schuller PGP us