"Fredrik Lundh" <fredrik at pythonware.com>: >no, it's a reference to the *object* pointed to by m2.x, at the time >from-import was executed. your setX function changes what m2.x >refers to, not the object. m1 won't notice. Now I understand. Thanks! >if it's still not clear, remember the fourth from-import rule: don't >use from-import unless you know exactly what you're doing ;-) I normally don't use from-import, but I have special needs for one project I'm working on. I process HTML files that contain embedded Python code, and I define handy variables and functions that can be used by embedded scripts. I make the definitions in a separate module to keep code structure clear. -- Kristian Ovaska <kristian.ovaska at helsinki.fi>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4