Arguement error

Jeffrey Maitland jeff.maitland at gmail.com
Thu Sep 1 11:54:56 EDT 2005


Found the error. It was not in the code at all it has to do with the fact 
that the String module has a translate method and it was being used not the 
one I wrote. 

Thanks again.

On 8/31/05, Terry Reedy <tjreedy at udel.edu> wrote:
> 
> 
> "Jeffrey Maitland" <jeff.maitland at gmail.com> wrote in message
> news:6829832e050831133030a012f9 at mail.gmail.com...
> Hello folks,
> 
> >I am wondering why I am getting this error. when I try to run a script.
> >TypeError: translate() takes at most 3 arguments (10 given)
> 
> Because you apparently gave it more than 3 args.
> 
> >>> str.translate.__doc__
> 'S.translate(table [,deletechars]) -> string\n\nReturn a copy of the 
> string
> S, where all characters occurring in the optional argument deletechars are
> removed, and the remaining characters have been mapped through the given
> translation table, which must be a string of length 256.'
> 
> >but the thing is the method translate actually accepts 10 arguements.
> 
> Why do you think that?
> 
> Terry J. Reedy
> 
> 
> 
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20050901/74a4025a/attachment.html>


More information about the Python-list mailing list