Closed faheel closed 6 years ago
I'll further test and send a PR if the problem is what I suspect it to be.
@faheel Seems like you're right. I'll wait for your PR. Thanks!
@faheel I think that we need to move custom_code()
to utils.py
as function, becuase it is use too often. And the creation of the Code()
objects each time is inexpedient.
@faheel So, i have fixed this issue in branch type-hinting
.
The following code:
always prints the same identifiers. Sample output:
Whereas using
Code.custom_code
works fine:Sample output:
I think this is because
Personal.identifier(...)
returnsCode(self.locale).custom_code(...)
, each time creating a new temporaryCode
object, rather than storing aCode
object in it,code = Code(self.locale)
, and callingcode.custom_code(...)
for it.