At 7:51 PM -0400 9/24/04, Jonathan Polley wrote:
On Fri, 24 Sep 2004 14:04:52 -0400, Dan Sugalski wrote:

 ...
 (Though class names/namespaces seem to be separate)
 ...

I think Guido might have made things a bit harder to separate out than you anticipate, unless I misread you. It appears that modules and classes are also imported into the same namespace as everything else in python.

Yeah, I had that pointed out in private mail. At this point I'm a half-step away from going fully unified. One thing though:


To expand (but to make the output more compact), my earlier program:

#!/usr/bin/env python
import os as a
print a         # <module 'os' from '/usr/lib/python2.3/os.pyc'>
class a:
    pass
print a         # __main__.a
def a():
    pass
print a         # <function a at 0x401e0b54>
a = 7
print a         # 7

What happens if you then do something like "import foo" and the foo module has a "class a:" definition in it?
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to