[Patches] [ python-Patches-1191489 ] Simplify logic in random.py
SourceForge.net
noreply at sourceforge.net
Thu Apr 28 07:31:31 CEST 2005
Patches item #1191489, was opened at 2005-04-28 00:31
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1191489&group_id=5470
Category: Library (Lib)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Raymond Hettinger (rhettinger)
Assigned to: Martin v. Löwis (loewis)
Summary: Simplify logic in random.py
Initial Comment:
Simplify the logic in several methods for better
readability, maintainability, and speed:
* while True --> while 1
* apply de'morgan's theorem to simplify compound
conditionals
* factor out repeated test: (p>1.0) and (p <= 1.0)
* replace pow() with **
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1191489&group_id=5470
More information about the Patches
mailing list