Set run vars with each call

Andrew Berg bahamutzero8825 at gmail.com
Tue Jul 12 19:50:59 CEST 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

On 2011.07.12 12:32 PM, Gnarlodious wrote:
> OK, that sets a value at init time. But is there a similar built-in 
> to run whenever the class instance is called?
What do you mean by call an instance? Do you want to run certain code
whenever any method is called? Do you want to want certain code to run
whenever an attribute is accessed? Calling an instance doesn't make any
sense, especially if you're not referring to the __init__() method.

- -- 
CPython 3.2.1 | Windows NT 6.1.7601.17592 | Thunderbird 5.0
PGP/GPG Public Key ID: 0xF88E034060A78FCB
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAwAGBQJOHImDAAoJEPiOA0Bgp4/LEzYH/1R+cXobysF02GiB45LcXjHm
oQsSkrbXtlvutgOlVHOI8MRVRzMndgK+0jWsujYD4nZYf45GO3b0hw/zb9jy3bUI
7BafZMRAz+wI1BJFlDD3P+IjPDoW4WvpMP0q09H4f664DYwQNuXfeveNOwAQnPXl
SpqpcvnTm0fqocC0o2G9jUuV50QXFFPntz/VVwl+3UpJLS95pCuAq+URs4OVhLM2
QB1ulmZ35PyfArdz5pYvoXvtfeURldfZhhAm1/mkVThzffUxAcCTANg6AeYd2JNb
QO0jSCedhrzWfsK5J63Ax+nrmjvms8+gZ3TxNkdMaz0zICtDuq5lLSIml1JuUfk=
=EMT2
-----END PGP SIGNATURE-----



More information about the Python-list mailing list