Handling 3 operands in an expression without raising an exception

Joel Goldstick joel.goldstick at gmail.com
Fri Sep 27 15:21:24 EDT 2013


On Fri, Sep 27, 2013 at 2:54 PM, Grant Edwards <invalid at invalid.invalid>wrote:

> On 2013-09-27, Denis McMahon <denismfmcmahon at gmail.com> wrote:
> > On Fri, 27 Sep 2013 18:32:23 +0100, Mark Lawrence wrote:
> >
> >> On 27/09/2013 18:00, Grant Edwards wrote:
> >>> On 2013-09-27, ?????????? <nikos.gr33k at gmail.com> wrote:
> >>>
> >>>> Sure your method follows the the logic in a straighforward way
> >>>> step-by-step but i just dont want to spent almost 20 lines of code
> >>>> just to calculate 2 variables(city and host).
> >>>
> >>> Does your provider charge you per line of code?
> >>>
> >>> If all that matters is the number of lines of code then use this:
> >>>
> >>>    city,host = 0,0
> >>>
> >>> Only _1_ nice short line of code.
> >>>
> >>> Happy?
> >>>
> >>>
> >> Classic overengineering, fancy wasting two whole spaces and having such
> >> long names.  Surely c,h=0,0 is vastly superior?
> >
> > Why not c=h=0
> >
> > 2 characters (28%) shorter!
>
> And 47% more opaque!
>
> --
> Grant Edwards               grant.b.edwards        Yow! ... he dominates
> the
>                                   at               DECADENT SUBWAY SCENE.
>                               gmail.com
> --
> https://mail.python.org/mailman/listinfo/python-list
>


better yet:  i=l=0

The names have even less meaning, and they are thin -- less space
-- 
Joel Goldstick
http://joelgoldstick.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130927/1d73ebdf/attachment.html>


More information about the Python-list mailing list