Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix prepend_zeroes #136

Closed
darodi opened this issue May 21, 2018 · 1 comment
Closed

fix prepend_zeroes #136

darodi opened this issue May 21, 2018 · 1 comment

Comments

@darodi
Copy link
Contributor

darodi commented May 21, 2018

There is a problem with the current implementation.

for example:

result = globalFunctions.GlobalFunctions().prepend_zeroes(20, 200)
print(result)

returns 20 instead of 020

check the definition of

   def zfill(self, width): 
        """
        S.zfill(width) -> string
        
        Pad a numeric string S with zeros on the left, to fill a field
        of the specified width.  The string S is never truncated.
        """

width is the desired final width, not the width of the prefix to add.

In this example, chapter 1.11 has 239 images.

__main__.py -cid 4e70e97cc092255ef70029dd -r 1-2

Xonshiz added a commit that referenced this issue May 21, 2018
@Xonshiz
Copy link
Owner

Xonshiz commented May 21, 2018

Since you've fixed this issue and the PR has been merged, I'm closing this issue :)

@Xonshiz Xonshiz closed this as completed May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants