Re: [Edu-sig] python versus __python__

2005-10-23 Thread Scott David Daniels
Arthur wrote: > Scott David Daniels wrote: > ... > Getting one's arms around all the practical implications of these issues > related to mutable, immutable - understanding when one should want to > retain object identity, and when one should want to break it, the full > implications of these d

Re: [Edu-sig] python versus __python__

2005-10-23 Thread Kirby Urner
> Here's the problem: > Your notion of equality is not transitive. That's tough -- it > invalidates the assumptions of the float type (and all basic types). > Also, you didn't tweak hash, so a dictionary with these things in them > would not find entries that turn out to be equal. > > --Scott

Re: [Edu-sig] python versus __python__

2005-10-23 Thread Scott David Daniels
Kirby Urner wrote: >>Kirby >> >>PS: since you've been studying subclassing primitive types using __new__, >>maybe you could show us a user-defined floating point type that reports >>two numbers equal if their absolute value difference is less than e. >>Anyone? >> > Fuzzy redone a breath: class

Re: [Edu-sig] python versus __python__

2005-10-23 Thread Kirby Urner
> Kirby > > PS: since you've been studying subclassing primitive types using __new__, > maybe you could show us a user-defined floating point type that reports > two numbers equal if their absolute value difference is less than e. > Anyone? > Like this I guess: >>> class Fuzzy(float):

Re: [Edu-sig] python versus __python__

2005-10-23 Thread Arthur
Scott David Daniels wrote: >Arthur wrote: > > >>My studies on the subject of subclassing the complex type have been quickly >>abandoned - it becoming clear that the fact the .real and .imag are read-only >>defeats the ideas I had for it. >> >> >Ahh: complex is (as are bool, int, long, stri

Re: [Edu-sig] python versus __python__

2005-10-23 Thread Scott David Daniels
Arthur wrote: > My studies on the subject of subclassing the complex type have been quickly > abandoned - it becoming clear that the fact the .real and .imag are read-only > defeats the ideas I had for it. Ahh: complex is (as are bool, int, long, string, and unicode) immutable. Changing such type

Re: [Edu-sig] python versus __python__

2005-10-23 Thread Arthur
Arthur wrote: > Arthur wrote: > >> Us non C programmers look forward to PyPy for the view of the >> netherworld it will >> give us. In truth I expect PyPy to bring a new burst of creative >> energy to the >> Python world, just by opening up the possibility of lower level >> exploration to a wi

Re: [Edu-sig] python versus __python__

2005-10-23 Thread Arthur
Arthur wrote: >Us non C programmers look forward to PyPy for the view of the netherworld it >will >give us. In truth I expect PyPy to bring a new burst of creative energy to the >Python world, just by opening up the possibility of lower level exploration to >a wider group of folks. > > So I g