GNOME Bugzilla – Bug 329658
Unable to provide pango.parse_markup with empty string for accel_marker
Last modified: 2006-04-02 15:36:13 UTC
Please describe the problem: The docs say you should be able to pass 0 as accell_marker, i.e. pango.parse_markup("foo", 0) but this doesn't work: TypeError: accel_mark must be one characterTypeError: pango.parse_markup() argument 2 must be string or read-only buffer, not int passing a empty string doesn't work either: TypeError: accel_mark must be one character I suggest we support passing None as second parameter for this. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
This looks like a doc bug to me. To specify that no accel_marker is needed you have to pass the u'\x00' character. I think it would be useful to have accel_marker default to u'\x00' in a future release of PyGTK.
Fixed in CVS: /cvs/gnome/gnome-python/pygtk/ChangeLog,v <-- ChangeLog new revision: 1.1380; previous revision: 1.1379 done Checking in pango.override; /cvs/gnome/gnome-python/pygtk/pango.override,v <-- pango.override new revision: 1.39; previous revision: 1.38 done Checking in tests/Makefile.am; /cvs/gnome/gnome-python/pygtk/tests/Makefile.am,v <-- Makefile.am new revision: 1.30; previous revision: 1.29 done RCS file: /cvs/gnome/gnome-python/pygtk/tests/test_pango.py,v done Checking in tests/test_pango.py; /cvs/gnome/gnome-python/pygtk/tests/test_pango.py,v <-- test_pango.py initial revision: 1.1 done