Skip to content

Conversation

@brukhabtu
Copy link

The length validator would return
'Value must be no more than %(max)d characters long'
without substituting min/max. Replacing with new style string formatting has fixed this.

The length validator would return 
'Value must be no more than %(max)d characters long'
without substituting min/max. Replacing with new style string formatting has fixed this.
@aconrad
Copy link
Contributor

aconrad commented Apr 15, 2014

Can you illustrate this problem a little more, I'm having a hard time understanding what the problem is exactly. Is this a scoping / closure issue with the namespace of the builtins min and max? If yes, why not change the function's params to be min_length and max_lenght?

I'm not against using format(), I'm just trying to understand how format fixes your problem.

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

Successfully merging this pull request may close these issues.

2 participants