[issue25549] call sum on list of timedelta throws TypeError

2015-11-03 Thread Kevin Jing Qiu

New submission from Kevin Jing Qiu:

Calling sum() on a list of timedelta objects results in TypeError: unsupported 
operand type(s) for +: 'int' and 'datetime.timedelta'

Here's a script that illustrates this behaviour:  (also attached)

import datetime

x = [datetime.timedelta(1), datetime.timedelta(2)]
print(x[0] + x[1])  # datetime.timedelta(3)
print(sum(x))  # TypeError: unsupported operand type(s) for +: 'int' and 
'datetime.timedelta'


The bug is present in all version of Python 2 and Python 3

--
components: Library (Lib)
files: demo.py
messages: 254038
nosy: kevinjqiu
priority: normal
severity: normal
status: open
title: call sum on list of timedelta throws TypeError
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40938/demo.py

___
Python tracker 
<http://bugs.python.org/issue25549>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18714] Add tests for pdb.find_function

2013-08-12 Thread Kevin Jing Qiu

Changes by Kevin Jing Qiu :


--
keywords: +patch
Added file: http://bugs.python.org/file31251/mywork.patch

___
Python tracker 
<http://bugs.python.org/issue18714>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18714] Add tests for pdb.find_function

2013-08-12 Thread Kevin Jing Qiu

New submission from Kevin Jing Qiu:

PyConCA 2013 sprint task

--
components: Tests
messages: 194986
nosy: Kevin.Jing.Qiu
priority: normal
severity: normal
status: open
title: Add tests for pdb.find_function
type: enhancement
versions: Python 3.5

___
Python tracker 
<http://bugs.python.org/issue18714>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com