anomaly

zipher dreamingforward at gmail.com
Sun May 10 20:57:56 EDT 2015


On Sunday, May 10, 2015 at 7:20:13 PM UTC-5, Mark Lawrence wrote:
> On 11/05/2015 01:14, Mark Rosenblitt-Janssen wrote:
> > 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
> >
> 
> Thanks for this, I've not found anybody new for my dream team in months.

Sorry, I forgot I unsubscribed from the mailing list and didn't see any replies and deduced that no one had noticed anything unexpected about the idea. 

I guess everyone expects this behavior since Python implemented this idea of "everything is an object", but I think this branch of OOP (on the branch of the Tree of Programming Languages) has to be chopped off.  The idea of everything is an object is backwards (unless your in a LISP machine).  Like I say, it's trying to be too pure and not practical.

Whatever,

Mark



More information about the Python-list mailing list