0

I'm new to Python, but have a long background in Perl, Ksh &c, C, and others.

"""One of the different things about Python is the import statement. How do you tell where a function or class name should be imported from? Some are obvious, like sys and math, but others aren't. Is there some sort of a directory that maps functionName to WhereItComesFrom?"""

3
Contributors
3
Replies
22
Views
2 Years
Discussion Span
Last Post by ZZMike
0

Perfect!!!! The "magic string" there is 'in module'.

And, of course, I just noticed that the chapter headings there are WhereItComesFrom? ("6.2. re — Regular expression operations" - so 'import re')

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.