Next: Member Types, Previous: More Types Meaningful, Up: More About Types in Python [Contents][Index]
When given a type specifier, Python will often rewrite it into a different (but equivalent) type. This is the mechanism that Python uses for detecting type equivalence. For example, in Python’s canonical representation, these types are equivalent:
(or list (member :end)) ≡ (or cons (member nil :end))
This has two implications for the user:
atom
,
null
, fixnum
, etc., are in no way magical. The
null
type is actually defined to be (member nil)
, list
is (or cons null)
, and
fixnum
is (signed-byte 30)
.