Menu

#127 unicode default arguments raises an error

closed-fixed
nobody
pythonwin (177)
5
2004-10-09
2004-06-30
Fedor Baart
No

A function with a default unicode argument raises an
error if pywin shows the argument-popup.

Reproduction:
Enter the folowing in the interactive window:
def test(a=u'a'):
pass

Enter "test(" and an error will be raised:
TypeError: array initializer must be list or string

The cause is that array's are created with the text of
the default arguments. This is done with typecode 'c'.
This isn't unicode compatible.

(PythonWin 2.3.4 (#53, May 25 2004, 21:17:02) build
201, Windows XP)

Discussion

  • Mark Hammond

    Mark Hammond - 2004-10-09

    Logged In: YES
    user_id=14198

    Fixed - thanks
    Checking in control.py;
    new revision: 1.14; previous revision: 1.13

     
  • Mark Hammond

    Mark Hammond - 2004-10-09
    • status: open --> closed-fixed