Opened 5 years ago
Last modified 5 years ago
#32709 closed Bug
fix utils/baseconv.py -> self.sign — at Initial Version
| Reported by: | pythonwood | Owned by: | |
|---|---|---|---|
| Component: | Utilities | Version: | 3.2 |
| Severity: | Normal | Keywords: | utils |
| Cc: | wuweishun@… | Triage Stage: | Accepted |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
I have a simple pull in gihub # 14339
https://github.com/django/django/pull/14339/commits/86e0ec9df0b5ed7a9160c10974bf1adef19eb539
def encode(self, i):
neg, value = self.convert(i, self.decimal_digits, self.digits, '-')
try and know that arg '-' should be self.sign:
In [1]: from django.utils import baseconv
In [2]: base11 = baseconv.BaseConverter('0123456789-', sign='$')
In [3]: base11.encode('$1234')
ValueError: substring not found
Note:
See TracTickets
for help on using tickets.