[Ironpython-users] IronPython, Daily Digest 11/29/2013

CodePlex no_reply at codeplex.com
Sat Nov 30 09:21:06 CET 2013


Hi ironpython,

Here's your Daily Digest of new issues for project "IronPython".

In today's digest:ISSUES

1. [New issue] iter(object) does not raise TypeError
2. [New issue] datetime.strptime with %f error

----------------------------------------------

ISSUES

1. [New issue] iter(object) does not raise TypeError
http://ironpython.codeplex.com/workitem/34705
User pekkaklarck has proposed the issue:

"It seems object and anything inheriting from it is considered iterable by iter(). With CPython and Jython you would get TypeError.

IronPython 2.7.3 (2.7.0.40) on .NET 4.0.30319.18052 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.



iter(object)
<iterator object at 0x000000000000002B>
class Test(object): pass
...
iter(Test)
<iterator object at 0x000000000000002C>



You cannot, however, actually iterate over these objects:



list(object)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: expected Array[Type], got int


"-----------------

2. [New issue] datetime.strptime with %f error
http://ironpython.codeplex.com/workitem/34706
User paweljasinski has proposed the issue:

"steps to reproduce:
c:\cygwin64\home\rejap>ipy
IronPython 2.7.4 (2.7.0.40) on .NET 4.0.30319.18052 (32-bit)
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> datetime.strptime("2013-11-29T16:38:12.507000", "%Y-%m-%dT%H:%M:%S.%f")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: cannot parse %j, %W, or %U w/ other values

taking out the %f part in string and format makes error go away:
>>> datetime.strptime("2013-11-29T16:38:12", "%Y-%m-%dT%H:%M:%S")
datetime.datetime(2013, 11, 29, 16, 38, 12)

test case with c-python:
rejap at eb60:~$ python
Python 2.7.4 (default, Sep 26 2013, 03:20:26) 
[GCC 4.7.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> datetime.strptime("2013-11-29T16:38:12.507000", "%Y-%m-%dT%H:%M:%S.%f")
datetime.datetime(2013, 11, 29, 16, 38, 12, 507000)
"
----------------------------------------------



----------------------------------------------
You are receiving this email because you subscribed to notifications on CodePlex.

To report a bug, request a feature, or add a comment, visit IronPython Issue Tracker. You can unsubscribe or change your issue notification settings on CodePlex.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20131130/55cc3c19/attachment.html>


More information about the Ironpython-users mailing list