[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-21 Thread Martin v. Löwis

Martin v. Löwis added the comment:

I can't see anything wrong with the feature. Of course, the patch itself
lacks changes to the test suite.

Ideally, there would also be changes to the documentation, but as
PyMemberDef seems to be undocumented currently, it's unfair to ask for
documentation with this patch. If documentation was made, it should list
for each T_ constant what the corresponding C type should be.

I think the cast to long (in PyBool_FromLong) is redundant.

--
assignee: loewis - 

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720595
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-21 Thread Georg Brandl

Georg Brandl added the comment:

Okay, added tests, removed the cast and committed in r60181. If I find
time, I'll add docs for PyMemberDef in the next few days.

--
resolution:  - accepted
status: open - closed

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720595
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-20 Thread Antoine Pitrou

Antoine Pitrou added the comment:

It seems to me that, when a boolean is to be represented, most C
programmers would expect a char rather than an int. Also an int would
make the object larger without any benefit.

As for type checking, Angelo's patch already does a PyBool_Check against
the argument. Is anything more required?

--
nosy: +pitrou

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720595
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-12 Thread Georg Brandl

Georg Brandl added the comment:

The question is also what C type to assume for boolean fields -- char or
int?

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720595
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue1720595] Allow T_BOOL in PyMemberDef definitions

2008-01-11 Thread Christian Heimes

Christian Heimes added the comment:

allow or reject it for 2.6, Georg?

--
nosy: +tiran
type:  - rfe
versions: +Python 2.6 -Python 2.5

_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1720595
_
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com