[Twisted-Python] What's the purpose of __?

Attila Nagy bra at fsn.hu
Tue Feb 15 05:36:28 EST 2011


Hi,

I'm trying to do an LMTP implementation based on smtp.py and came to the 
issue of class private variables with double underscores.
Examples:
http://twistedmatrix.com/trac/browser/trunk/twisted/mail/smtp.py#L746
http://twistedmatrix.com/trac/browser/trunk/twisted/mail/smtp.py#L815
and a lot of occurrences in this file.

This makes me a problem, because I override some functions in a class, 
named LMTP, so these cannot work together.

What's the rationale of using these, instead of static names?

Thanks,




More information about the Twisted-Python mailing list