[IronPython] bug with str.encode() (diff with GNU python)

Stanislas Pinte stan at ertmssolutions.com
Fri Aug 18 15:07:52 CEST 2006


more info on what 2.4 should be:

> encode(  	[encoding[,errors]])
>     Return an encoded version of the string. Default encoding is the current default string encoding. errors may be given to set a different error handling scheme. The default for errors is 'strict', meaning that encoding errors raise a UnicodeError. Other possible values are 'ignore', 'replace', 'xmlcharrefreplace', 'backslashreplace' and any other name registered via codecs.register_error. For a list of possible encodings, see section 4.9.2. New in version 2.0. Changed in version 2.3: Support for 'xmlcharrefreplace' and 'backslashreplace' and other error handling schemes added. 



Stanislas Pinte a écrit :
> Hello,
> 
> [sim-ironpython]> python
> Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> "a".encode()
> 'a'
>>>> ^Z
> 
> [sim-ironpython]> ironpython/ipy.exe
> IronPython 1.0.60816 on .NET 2.0.50727.42
> Copyright (c) Microsoft Corporation. All rights reserved.
>>>> "a".encode()
> Traceback (most recent call last):
>   File , line 0, in <stdin>##86
> TypeError: encode() takes at least 1 argument (0 given)
> 
> 


-- 
-----------------------------------------------------------------
   Stanislas Pinte             e-mail: stan at ertmssolutions.com
   ERTMS Solutions               http://www.ertmssolutions.com
   Rue de l'Autonomie, 1             Tel:    + 322 - 522.06.63
   1070        Bruxelles              Fax:   + 322 - 522.09.30
-----------------------------------------------------------------
   Skype (http://www.skype.com) id:                  stanpinte
-----------------------------------------------------------------




More information about the Ironpython-users mailing list