inclusive-lower-bound, exclusive-upper-bound (was Re: Range Operation pre-PEP)

Andrew Maizels andrew at one.net.au
Sat May 12 22:57:42 EDT 2001


Stephen Hansen wrote:

>     I realize you said that you do not like semi-colons, but it seems to me
> that your use of a period as a statement seperator has its own problems.
> Consider the following:
> 
>         print 1.
> 
>     In Python, that is printing a floating point number. In Pixy, that is
> printing an integer. Now, It'd be all fine and dandy to just make it a
> language requirement that all floating points *have* a number after the
> decimal point, but it eats at the clairity and starts looking uncool:
> 
>         print 1.0.
> 
>     Just an example. :)

Yep, that's exactly what you have to do.  Personally, I don't find 1.0
uncool at all, unless it's a release number (I'd wait for 1.2, myself).

To be precise, a period followed by whitespace is a statement separator;
periods are allowed in other contexts with other meanings.  

Andrew.
-- 
There's only one game in town.
You can't win.
You can't break even.
You can't quit the game.		-- The four laws of thermodynamics.



More information about the Python-list mailing list