Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
) This patch adds support for mixed lengths 0-padding ranges by always using strings instead of integers in the inner set. No need to keep track of padding length per set anymore, as this information is self contained in the strings. Old behavior (single padding length supported): $ cluset -f bar002,bar01,bar0 bar[000-002] New behavior (mixed padding lengths supported): $ cluset -f bar002,bar01,bar0 bar[0,01,002] RangeSet.padding is now available as a property. In case of zero padding with mixed lengths, it returns the maximum padding length. It can also still be used to force a fixed-length padding on the set. Example: >>> r = RangeSet("0,01,002") >>> r 0,01,002 >>> r.padding 3 >>> r.padding = 4 >>> r 0000-0002 >>> r.padding = None >>> r 0-2 Older versions of RangeSet are automatically converted when unpickled. Add check when parsing bogus ranges like 01-010. This is stricter but should avoid mistake and syntax error. Closes #293 #442
- Loading branch information
Showing
8 changed files
with
674 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.