On Monday 08 January 2007 07:24, Jeff Hinrichs - DM&T wrote:
Working my way through the Identity system, wrt model.py, I see that the _set_password(self, method in the User class is redefining the python built-in keyword, hash(1)def _set_password(self, cleartext_password): "Runs cleartext_password through the hash algorithm before saving." hash = identity.encrypt_password(cleartext_password) self._SO_set_password(hash) Is it really intended to redefine the built-in? If so, it is not
I agree that it usually is a bad idea to shadow builtins by local variable names - but I wouldn't say that in this case it really deserves attention. Giving the name "hash" to a hash of a password is ... natural, and with the very limited scope of that operation, I think it is ok.
Diez --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

