[issue19016] autospecced namedtuples should be truthy by default

2020-07-27 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +xtreak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset ac19ff225280 by Eli Bendersky in branch 'default': Fix .hgtouch to list the dependencies for auto-generated AST code correctly. http://hg.python.org/cpython/rev/ac19ff225280 -- nosy: +python-dev ___

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- Removed message: http://bugs.python.org/msg198484 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19016 ___

[issue19016] autospecced namedtuples should be truthy by default

2013-09-27 Thread Michael Foord
Michael Foord added the comment: I dislike adding namedtuple specific code to mock. How many different types should we special case here and in other places? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19016

[issue19016] autospecced namedtuples should be truthy by default

2013-09-26 Thread Shawn Krisman
Shawn Krisman added the comment: This fix is actually backwards compatible. This is a more powerful patch too because not only does it provide a better default for truthiness, but it also provides a better default for length. I also fixed a spelling mistake involving the word calculate.

[issue19016] autospecced namedtuples should be truthy by default

2013-09-16 Thread Michael Foord
Michael Foord added the comment: The problem is that the change you're proposing is backwards incompatible. Code using MagicMock and objects with length will break. -- assignee: - michael.foord versions: +Python 3.4 -Python 3.5 ___ Python tracker

[issue19016] autospecced namedtuples should be truthy by default

2013-09-16 Thread Shawn Krisman
Shawn Krisman added the comment: Yeah in my head I was thinking it would affect relatively few people who depended on the change, but it's definitely hard to prove that! How about a change that special cases namedtuple? -- ___ Python tracker

[issue19016] autospecced namedtuples should be truthy by default

2013-09-14 Thread Shawn Krisman
New submission from Shawn Krisman: import mock from collections import namedtuple Foo = namedtuple('Foo', bar) mock_foo = mock.create_autospec(Foo) if mock_foo: print('the namedtuple is truthy') else: print('the namedtuple is not truthy') The expected behavior is that it should print