[IronPython] Problems with {field}.__dict__.items()

Vizcayno vizcaynot at gmail.com
Tue Dec 18 02:53:55 CET 2007


I Cpython I have next code:
a='text'
b=type(a)
print b.__dict__.items()
[('upper', <method 'upper' of 'str' objects>), ('__getslice__', <slot
wrapper '__getslice__' of 'str' objects>), 'startswith', <method
'startswith' of 'str' objects>), ('lstrip', <method 'lstrip' of 'str'
objects>),
('capitalize', method'capitalize' of 'str' objects>), ('__str__',
<slot wrapper '__str__' of 'str'
objects>), ('__getattribute__', <slot wrapper '__getattribute__' of
'str' objects>
), ('rpartition', <method 'rpartition' of 'str' objects>), ('replace',
<method '
................................ etc.

In Ipy 2.0A06 the result is different:

Traceback (most recent call last):
  File , line 0, in ##711
AttributeError: 'dictproxy' object has no attribute 'items'

Regards.



More information about the Ironpython-users mailing list