lazaridis_com wrote:
> I would like to change the construct:
>
> if __name__ == '__main__':
...

Is there a standard way / naming to wrap "__name__" and other similar
attributes to an encapsulating class?

Something like e.g.:

if mod.name ...

or

if gbl.name ...

-

"gbl.newAttribute = value" would create __newAttribute__

This should become available whereever such __<attributes>__ occour.

(I assume this should be implementable with e.g. metaclasses)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to