GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — `python -m random --float N` should pick a float between 0 and N, not 1 and N · Issue #123968 · python/cpython Closed Labels 3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesrelease-blockerstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:In the specification for the new
However, what was actually implemented (#118132, cc @hugovk) was $ python -m random --help […] -f, --float N print a random floating-point number between 1 and N inclusive $ python -m random 2.0 1.883974829952927 $ python -m random 2.0 1.034610672623156 $ python -m random 2.0 1.3676261878147473 $ python -m random 2.0 1.1875340810783404 $ python -m random 2.0 1.6148479875565644 $ python -m random 1.0 1.0 This is surprising and not helpful. Everyone will expect a range of length (Note that this is completely distinct from the debate about whether it’s more natural to select integers from CPython versions tested on:3.13 Operating systems tested on:Linux Linked PRsReacted by Shantanu, Kirill Podoprigora and Kamil Monicz Activity
MetadataMetadataAssigneesLabels3.13only security fixesonly security fixes3.14bugs and security fixesbugs and security fixesrelease-blockerstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |