micropython

tests/compare_membership.py

440:cf329206154e
2011-07-03 Paul Boddie Introduced constant usage tracking.
     1 #!/usr/bin/env python     2      3 a = 1     4      5 class X:     6     def __contains__(self, other):     7         return 1     8      9 x = X()    10     11 result_5 = 0    12 result_6 = 6    13     14 if a in x:    15     result_5 = 5    16     17 if a not in x:    18     result_6 = 0    19     20 # vim: tabstop=4 expandtab shiftwidth=4