Re: Validating A User/Password Pair + Getting Groups On Unix

2005-03-01 Thread Kanenas
On Tue, 1 Mar 2005 09:45:26 -0600, Skip Montanaro <[EMAIL PROTECTED]> wrote: >>> 1) Validate that the password is correct for that user *without >>>actually logging in*. >>> >Kanenas> The 'pwd' module probably won't be

Re: Decimal, __radd__, and custom numeric types...

2005-02-28 Thread Kanenas
On 28 Feb 2005 12:11:33 -0800, "Blake T. Garretson" <[EMAIL PROTECTED]> wrote: [...] >From the Python docs (specifically sections 3.3.7 and 3.3.8), I thought >that the left object should try its own __add__, and if it doesn't know >what to do, THEN try the right object's __radd__ method. To me

Re: Validating A User/Password Pair + Getting Groups On Unix

2005-02-28 Thread Kanenas
On 28 Feb 2005 20:17:58 EST, Tim Daneliuk <[EMAIL PROTECTED]> wrote: [...] >Given a username and a password (plain text): > > 1) Validate that the password is correct for that user *without actually > logging in*. > The naive solution is to use the 'crypt' module to encrypt the alleged password

Re: Validating A User/Password Pair + Getting Groups On Unix

2005-02-28 Thread Kanenas
On 28 Feb 2005 20:17:58 EST, Tim Daneliuk <[EMAIL PROTECTED]> wrote: [...] >Given a username and a password (plain text): > > 1) Validate that the password is correct for that user *without actually > logging in*. > The 'pwd' module probably won't be able (and won't try) to read the shadow pass

Re: deepcopy chokes with TypeError on dynamically assigned instance method

2005-02-15 Thread Kanenas
On Sun, 13 Feb 2005 12:01:42 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >> True. It wouldn't cause a problem within my __init__, since the >> attribute is reassigned after the deepcopy, though should anyone else >> deepcopy an instance... Definitely better that the deepcopy throws the >>

Re: deepcopy chokes with TypeError on dynamically assigned instance method

2005-02-10 Thread Kanenas
On Thu, 10 Feb 2005 00:54:04 -0800, Kanenas wrote: >When an instance has a dynamically assigned instance method, deepcopy >throws a TypeError with the message "TypeError: instancemethod >expected at least 2 arguments, got 0". I forgot to mention that the TypeError

Re: deepcopy chokes with TypeError on dynamically assigned instance method

2005-02-10 Thread Kanenas
On Thu, 10 Feb 2005 23:50:09 +1000, Nick Coghlan <[EMAIL PROTECTED]> wrote: >> def __init__(self, l=[]): > >Change this too: > def __init__(self, l=None): > if l is None: l = [] Same error. The only ways of not getting the TypeError I've found are not to call deepcopy or not assign an