Integers with leading zeroes

Chris Angelico rosuav at gmail.com
Thu Jul 23 00:32:28 CEST 2015


On Thu, Jul 23, 2015 at 1:38 AM, MRAB <python at mrabarnett.plus.com> wrote:
>> Does the same condition hold for strings? If you are not performing string
>> operations on something, it is not a string?
>>
> Tkinter comes to mind. You specify how widgets are laid out strings
> that are basically flags:
>
>     text_widget.pack(side=LEFT, fill=BOTH, expand=YES)
>
> where LEFT, BOTH and YES are strings.

The nearest term I can come up with here is that those three are
*atoms*. They might be implemented as integers (most C-style APIs work
that way), or as strings (which is apparently the case in Tkinter), or
as instances of object() that exist solely so their identities can be
checked (Python function default arguments are often done that way),
but there's only one operation you're allowed to do: Ask if one atom
is identical to another atom.

ChrisA


More information about the Python-list mailing list