inclusive-lower-bound, exclusive-upper-bound (was Re: Range Operation pre-PEP)
Stephen Hansen
news at myNOSPAM.org
Sat May 12 01:10:28 EDT 2001
"Andrew Maizels" <andrew at one.net.au> wrote in message
news:3AFCA28D.BA438484 at one.net.au...
> open database accounts for read.
> import send_polite_email, send_polite_letter from send_letter.
>
> var c, i are buffer.
> var over60 is decimal.
>
> for c in customer
> where c.balance <= 50:
> -- can safely ignore customers with balance <= $50
>
> over60 := 0.
>
> for i in item
> where i.custnum = c.custnum and
> i.duedate < today - 60 and
> i.open <> 0:
> over60 += i.open.
> end.
>
> if over60 > 50 then do:
> if c.email <> ""
> then send_polite_email(c.email,c.name,c.balance,over60).
> else send_polite_letter(c.address,c.name,c.balance,over60).
> end.
> end.
>
>
> Pixy's syntax is still in flux, but that will give you the idea.
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. :)
--Stephen
(replace 'NOSPAM' with 'seraph' to respond in email)
More information about the Python-list
mailing list