[tahoe-lafs-trac-stream] [tahoe-lafs] #1812: parse_abbreviated_size doesn't accept T for terabytes (and other quibbles with the regex it uses)
tahoe-lafs
trac at tahoe-lafs.org
Thu Dec 27 21:43:52 UTC 2012
#1812: parse_abbreviated_size doesn't accept T for terabytes (and other quibbles
with the regex it uses)
-------------------------+-------------------------------------------------
Reporter: | Owner: zancas
davidsarah | Status: new
Type: defect | Milestone: 1.10.0
Priority: normal | Version: 1.9.2
Component: code | Keywords: reserved_space storage error
Resolution: | usability review-needed
Launchpad Bug: |
-------------------------+-------------------------------------------------
Comment (by Zancas):
The "{{{^}}}" symbol in the re.match call used to parse out the "number"
and "suffix" values is, if I understand correctly, redundant with the way
re.match works.
This is because the "pattern" (first) argument to re.match is applied to
the beginning of the "string" (second) argument. The "{{{^}}}" specifies
that the pattern is to match from the beginning of its target. So the two
functions, the one intrinsic to re.match, and the one specified by
"{{{^}}}" are identical.
This doesn't necessarily mean that the "{{{^}}}" should be removed from
the code as it, debatably, increases readability.
--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1812#comment:6>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage
More information about the tahoe-lafs-trac-stream
mailing list