- publishing free software manuals
Python Language Reference Manual
by Guido van Rossum and Fred L. Drake, Jr.
Paperback (6"x9"), 120 pages
ISBN 0954161785
RRP £12.95 ($19.95)

Sales of this book support the Python Software Foundation! Get a printed copy>>>

5.2.2 Literals

Python supports string literals and various numeric literals:

literal stringliteral
| integer | longinteger | floatnumber | imagnumber

Evaluation of a literal yields an object of the given type (string, integer, long integer, floating point number, complex number) with the given value. The value may be approximated in the case of floating point and imaginary (complex) literals. See section 2.4 for details.

All literals correspond to immutable data types, and hence the object's identity is less important than its value. Multiple evaluations of literals with the same value (either the same occurrence in the program text or a different occurrence) may obtain the same object or a different object with the same value.

ISBN 0954161785Python Language Reference ManualSee the print edition