[Tutor] file i.o
Danny Yoo
dyoo at hkn.eecs.berkeley.edu
Sun Jan 25 16:30:43 EST 2004
> It's the exact same issue in Python. The cosmetic difference here is
> that the Perl folks define @EXPORT/@EXPORT_OK arrays, and the Python
> folks use the 'from module import */import' statements.
Hi everyone,
My apologies: the parallelism in the original statement was wrong. I
wasn't as careful as I should have been when I wrote that. I should have
said:
It's the exact same issue in Python. The cosmetic difference here is
that the Perl folks use different forms of the 'use' statement, and the
Python folks use the 'import/from module import *' statements.
If I had wanted to form a parallel for @EXPORT/@EXPORT_OK, I should have
continued:
Perl's @EXPORT arrays have a counterpart in Python's '__all__' list:
http://www.python.org/doc/tut/node8.html#SECTION008410000000000000000
But unlike Perl, Python doesn't pulls all of __all__ into the current
namespace unless we use the 'from foo import *' form.
Anyway, sorry for the confusion!
More information about the Tutor
mailing list