From: Paul Prescod Date: 2001-07-31T01:25:45+09:00 Subject: [ruby-talk:18824] Numeric model Yukihiro Matsumoto wrote: > > Hi, > > In message "[ruby-talk:18781] Re: Ruby as opposed to Python?" > on 01/07/30, Paul Prescod writes: > > |In my opinion, either integers should be substitutable for floats or > |should not be. In Python and Ruby they are "almost", "mostly", "usually" > |substitutable. > > I don't understand what you mean by "fully substitutable". You mean > seq[1.0] will become legal in Python 3.0? How about seq[1.2]? I'm talking about *integer objects* being substutable for *float objects* in the same OO sense that cows are supposed to be substitutable for mammals. Your algorithm should not radically change its behaviour when you pass in an integer versus a float. As an aside: you see "1.0" as a float but in my perfect language it would be a rational, equivalent to "4/4" or "1". Also in my imagination they would all be valid (and equivalent!) sequence indexes. -- Take a recipe. Leave a recipe. Python Cookbook! http://www.ActiveState.com/pythoncookbook