micropython

tests/attributes1.py

212:9cb85e5768fa
2009-05-09 Paul Boddie Added missing funccode to structures. Renamed function_from_method to as_instantiator with naming changes. Added a test of instantiation and keywords.
     1 #!/usr/bin/env python     2      3 class C:     4     clsattr = 123     5      6     def __init__(self, value):     7         self.instattr = value     8         self.clsattr     9     10     def update(self, value):    11         self.attr = value    12         C.clsattr    13     14 C    15 C.clsattr    16 C(456).update(789)    17     18 # vim: tabstop=4 expandtab shiftwidth=4