On Sat, 2013-11-09, Chris Angelico wrote:
> On Sun, Nov 10, 2013 at 12:08 AM, John von Horn <j....@btinternet.com> wrote:
...
>> * Why not allow floater=float(int1/int2) - rather than floater=float
>> (int1)/float(int2)?
>>
>> Give me a float (or an error message) from evaluating everything in the
>> brackets. Don't make me explicitly convert everything myself (unless I
>> want to)
>
> As others have said, what you're asking for is actually magic. One of
> the rules of Python - one for which I'm not aware of any exceptions -
> is that you can always take a subexpression out and give it a new
> name:

And it's not just Python: programming languages have been designed
that way since at least the 1960s.  People are used to analysing
expressions inside and out according to rules common for almost all
languages.

/Jorgen

-- 
  // Jorgen Grahn <grahn@  Oo  o.   .     .
\X/     snipabacken.se>   O  o   .
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to