A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/python/peps/commit/0c790e7b721bd13ad12ab9e6f6206836f398f9c4 below:

Argue for shortening lines · python/peps@0c790e7 · GitHub

File tree Expand file treeCollapse file tree 1 file changed

+7

-5

lines changed

Filter options

Expand file treeCollapse file tree 1 file changed

+7

-5

lines changed Original file line number Diff line number Diff line change

@@ -252,12 +252,14 @@ before it. Some examples::

252 252 253 253

def __init__(self, width, height,

254 254

color='black', emphasis=None, highlight=0):

255 -

if (width == 0 and height == 0 and

256 -

color == 'red' and emphasis == 'strong' or

257 -

highlight > 100):

255 +

zero_area = (width == 0 and height == 0)

256 +

bad_value = (

257 +

(zero_area and color == 'red' and emphasis == 'strong')

258 +

or highlight > 100

259 +

)

260 +

if bad_value:

258 261

raise ValueError("sorry, you lose")

259 -

if width == 0 and height == 0 and (color == 'red' or

260 -

emphasis is None):

262 +

if zero_area and (color == 'red' or emphasis is None):

261 263

raise ValueError("I don't think so -- values are %s, %s" %

262 264

(width, height))

263 265

Blob.__init__(self, width, height,

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4