Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > cz.comp.lang.python > #3052

Re: [python] Coding style

From Matěj Cepl <mcepl@cepl.eu>
Newsgroups cz.comp.lang.python
Subject Re: [python] Coding style
Date 2015-11-26 11:59 +0100
Organization Aioe.org NNTP Server
Message-ID <slrnn5dph8.bf3.mcepl@mitmanek.ceplovi.cz> (permalink)
References <mailman.11.1448522817.3505.python@py.cz>

Show all headers | View raw


On 2015-11-26, 07:26 GMT, Petr Blahos wrote:
> Ahoj, co považujete za lepší coding style?
>
> if evt:
>     evt.Skip()

Vždy. Ternární operátor je OPERÁTOR a evt.Skip() nevypadá, že by 
něco vracel.

Kromě toho ternární operátor je zplozencem pekla, ale v tomto 
případě ani v nejlepším případě není na místě.

Matěj

-- 
https://matej.ceplovi.cz/blog/, Jabber: mcepl@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB  25C3 E09F EF25 D964 84AC
 
But if we find we have left our bones to bleach in these desert
sands for nothing, beware the fury of the legions...
      -- Centurion in a letter home from North Africa
         3rd Century

Back to cz.comp.lang.python | Previous | NextNext in thread | Find similar


Thread

Re: [python] Coding style Matěj Cepl <mcepl@cepl.eu> - 2015-11-26 11:59 +0100
  Re: [python] Coding style Vladimir Macek <macek@sandbox.cz> - 2015-11-26 13:30 +0100
    Re: [python] Coding style Matěj Cepl <mcepl@cepl.eu> - 2015-11-26 18:33 +0100

csiph-web