[Zope-Checkins] CVS: Zope3/lib/python/Schema - _Field.py:1.8
Jeremy Hylton
jeremy@zope.com
Tue, 16 Jul 2002 19:25:58 -0400
Update of /cvs-repository/Zope3/lib/python/Schema
In directory cvs.zope.org:/tmp/cvs-serv17411/Schema
Modified Files:
_Field.py
Log Message:
type(not 1) does not work the same with Python 2.2 and 2.3.
I'm not sure what the code was intending to do, but explicit is better
than implicit: The tests expect it to be int, so say that directly.
=== Zope3/lib/python/Schema/_Field.py 1.7 => 1.8 ===
class Bool(Field):
"""A field representing a Bool."""
- type = type(not 1)
+ # XXX Do we really expect this to be an int?
+ # The BoolTest only work if Bool corresponds to Python's int.
+ type = int
class Int(Field):
"""A field representing a Integer."""