micropython

tests/compare2.py

207:79f8d72c8c78
2009-05-01 Paul Boddie Removed the instance attribute from DataObject (the common data structure), employing the presence of a value on the attrcode attribute to indicate the instance status of objects.
     1 #!/usr/bin/env python     2      3 a = 1     4 b = 2     5 c = 3     6      7 class X:     8     def __contains__(self, other):     9         return 1    10     11 x = X()    12     13 a == x != b    14 a is x is not b    15 a in x    16     17 # vim: tabstop=4 expandtab shiftwidth=4