Ignore:
Timestamp:
Sep 1, 2013, 8:14:59 AM (11 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '4a9821a93ffdc22a6696668bd4f6b8c9de3e6c5f')
Children:
3b214c36377a112627c5c625e4f381a446911269
Parents:
6af0619c6552cdcec5fde3657123ad6e806d0842
Message:
Fixed the test Manual/pyobject_related_functions.tst (which was failing for some python builds)

Note: string attribute __doc__ is documented differently in some python versions
e.g. "str(object) -> ..." vs "str(object='') -> ..."
see http://bugs.python.org/review/15516/diff2/5609:6750/Objects/stringobject.c?context=&column_width=80
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Tst/Manual/pyobject_related_functions.tst

    r6af0619 r33300d  
    33
    44  // Additional functionality through attrib
    5   attrib(pystr, "__doc__");
     5  attrib(pystr, "__class__");    // should always be "<type 'str'>"...
    66  proc(attrib(pystr, "count"))("K");
    77
    8   pystr."__doc__";           // <- Short notations
    9   pystr.count("a");          // Even shorter (if attribute's name is valid and unused)
     8  pystr."__class__";             // <- Short notations
     9  pystr.count("a");              // Even shorter (if attribute's name is valid and unused)
    1010
    1111  python_run("def func(): return 17");
Note: See TracChangeset for help on using the changeset viewer.