Handling 3 operands in an expression without raising an exception

Antoon Pardon antoon.pardon at rece.vub.ac.be
Sat Sep 28 09:53:13 EDT 2013


Op 28-09-13 00:06, Νίκος schreef:
> Στις 27/9/2013 8:00 μμ, ο/η Grant Edwards έγραψε:
>> 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?
>>
>
> Well to tell the truth no matter what you say to me if something can be
> written in less lines than another implementation but still retain its
> simplicity and straightforward logic behind it i would prefer it!
> I don't know why you think otherwise, especially people who are used to
> write Perl code(me being one of them) would agree with me!

The problem is, as it stands you seem to make it a priority to write
compact code over correct code, wasting everybody's time.

If you hadn't been insisting on trying to reduce the number of lines
of the various given proposals, you might already have a working
solution and be working on something else.

As it is all your attempts to reduce the number of lines while retaining
its simplicity and straightforward logic behind it have only resulted in
you producing code that didn't work.

People like you who judge code in one language by how much it resembles
code in an other language are like people who used to work with glue but
need to work with hammer and nails for some reason and are surprised
they just can't subtituted nails for glue and fail to see they may have
to rethink the design. So they just keep trying glue solutions with
nails and every nail solution that is offered by people who have
experience with nails, they will adapt until it looks like it could be
a glue solution. In the mean time all these glue solutions fail and
much time is wasted.

-- 
Antoon Pardon




More information about the Python-list mailing list