Re: anomaly

2015-05-10 Thread Mark Rosenblitt-Janssen
In case the example given at the start of the thread wasn't interesting enough, it also works in the other direction: >>> class str(int): pass >>> str('2') 2 #<- an integer!!! Mark -- https://mail.python.org/mailman/listinfo/python-list

Re: anomaly

2015-05-10 Thread Mark Rosenblitt-Janssen
one has to see the mix-in classes. I'm inventing a new term for this kind of inheritence: expansion. I've enclosed one class inside of another, but yet it's not quite "encapsulation" (in the C++ sense). Cheers, Mark J http://wiki.hackerspaces.org/Hacking_with_th

Re: anomaly

2015-05-10 Thread Mark Rosenblitt-Janssen
fying. I hope that there's at least one person who sees the issue. Mark On 5/10/15, Mark Rosenblitt-Janssen wrote: > Here's something that might be wrong in Python (tried on v2.7): > >>>> class int(str): pass > >>>> int(3) > '3' > > Mark > -- https://mail.python.org/mailman/listinfo/python-list

anomaly

2015-05-10 Thread Mark Rosenblitt-Janssen
Here's something that might be wrong in Python (tried on v2.7): >>> class int(str): pass >>> int(3) '3' Mark -- https://mail.python.org/mailman/listinfo/python-list