Drilling down in a dict with "complex" objects

2010-05-24 Thread Six
I am trying to access an objects sub-object attributes. I can boil the code I am working with down to this problem section: (snip) class Pt: x = None y = None def __init__(self, x, y): self.x, self.y = x, y pass class Pts: curr_point = None next_point = None def __init__(self, n,

Announcing Methodfinder

2019-09-10 Thread Bill Six
1) == 1 -(-1) -1.bit_length() -1.denominator abs(-1) >>> methodfinder.find(1,2) == 3 1+2 1^2 1|2 2+1 2^1 2|1 >>> methodfinder.find(1,1) == 1 1&1 1**1 1*1 1.__class__(1) 1.denominator 1.numerator 1.real 1//1 1|1 math.gcd(1, 1) max(1, 1) min(1, 1) pow(1, 1) round(1, 1) >>> methodfinder.find([1,2], '__iter__') == True hasattr([1, 2], '__iter__') Bill Six -- https://mail.python.org/mailman/listinfo/python-list