On 9/23/2020 1:55 PM, Michal Krompiec wrote:
Uhm, you’re right.
This is not unique to python, python just adds the name-binding twists
to the confusion. E.g. C++ methods aren't any different: they exist on
code pages regardless of whether their classes have been instantiated or
not, and are implicitly passed *this*, just like python's bound methods
get __self__.
The compiler and/or runtime enforces scope and visibility rules and will
throw an error on a symbol that isn't defined and/or visible in a given
scope. Python's trickier than C++ because the latter constructs a symbol
table at compile time so at runtime all names "exist" from the opening
curly. In python they're only visible from the moment they're "bound".
Unless they're method names, IIRC.
Confused yet? ;)
Dima
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss