<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!--Converted with LaTeX2HTML 98.2 beta6 (August 14th, 1998)
original version by:  Nikos Drakos, CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>5. Expressions</TITLE>
<META NAME="description" CONTENT="5. Expressions">
<META NAME="keywords" CONTENT="ref">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="ref.css">
<LINK REL="next" HREF="simple.html">
<LINK REL="previous" HREF="execmodel.html">
<LINK REL="up" HREF="ref.html">
<LINK REL="next" HREF="conversions.html">
</HEAD>
<BODY bgcolor="#ffffff">
<div class=navigation>
<table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="conversions.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="ref.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="exceptions.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Python Reference Manual</b></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="contents"
 src="../icons/contents.gif"></A></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
<td><A HREF="genindex.html"><img width=32 height=32 align=bottom border=0 alt="index"
 src="../icons/index.gif"></A></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="conversions.html">5.1 Arithmetic conversions</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="ref.html">Python Reference Manual</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="exceptions.html">4.2 Exceptions</A></span>
<br><hr></div>
<!--End of Navigation Panel-->

<H1><A NAME="SECTION007000000000000000000"></A>
<a name="l2h-431"></a>
<BR>
5. Expressions
</H1>

<P>
This chapter explains the meaning of the elements of expressions in
Python.

<P>
<b>Syntax Notes:</b> In this and the following chapters, extended
BNF<a name="l2h-432"></a> notation will be used to describe syntax, not lexical
analysis.  When (one alternative of) a syntax rule has the form

<P>
<dl><dd><pre class=verbatim>
name:           othername
</pre></dl>

<P>
and no semantics are given, the semantics of this form of <tt>name</tt>are the same as for <tt>othername</tt>.
<a name="l2h-433"></a>

<P>

<p><hr>
<!--Table of Child-Links-->


<UL>
<LI><A NAME="tex2html692"
 HREF="conversions.html">5.1 Arithmetic conversions</A>
<LI><A NAME="tex2html693"
 HREF="atoms.html">5.2 Atoms</A>
<UL>
<LI><A NAME="tex2html694"
 HREF="atom-identifiers.html">5.2.1 Identifiers (Names)</A>
<LI><A NAME="tex2html695"
 HREF="atom-literals.html">5.2.2 Literals</A>
<LI><A NAME="tex2html696"
 HREF="parenthesized.html">5.2.3 Parenthesized forms</A>
<LI><A NAME="tex2html697"
 HREF="lists.html">5.2.4 List displays</A>
<LI><A NAME="tex2html698"
 HREF="dict.html">5.2.5 Dictionary displays</A>
<LI><A NAME="tex2html699"
 HREF="string-conversions.html">5.2.6 String conversions</A>
</UL>
<LI><A NAME="tex2html700"
 HREF="primaries.html">5.3 Primaries</A>
<UL>
<LI><A NAME="tex2html701"
 HREF="attribute-references.html">5.3.1 Attribute references</A>
<LI><A NAME="tex2html702"
 HREF="subscriptions.html">5.3.2 Subscriptions</A>
<LI><A NAME="tex2html703"
 HREF="slicings.html">5.3.3 Slicings</A>
<LI><A NAME="tex2html704"
 HREF="calls.html">5.3.4 Calls</A>
</UL>
<LI><A NAME="tex2html705"
 HREF="power.html">5.4 The power operator</A>
<LI><A NAME="tex2html706"
 HREF="unary.html">5.5 Unary arithmetic operations</A>
<LI><A NAME="tex2html707"
 HREF="binary.html">5.6 Binary arithmetic operations</A>
<LI><A NAME="tex2html708"
 HREF="shifting.html">5.7 Shifting operations</A>
<LI><A NAME="tex2html709"
 HREF="bitwise.html">5.8 Binary bit-wise operations</A>
<LI><A NAME="tex2html710"
 HREF="comparisons.html">5.9 Comparisons</A>
<LI><A NAME="tex2html711"
 HREF="lambda.html">5.10 Boolean operations</A>
<LI><A NAME="tex2html712"
 HREF="exprlists.html">5.11 Expression lists</A>
<LI><A NAME="tex2html713"
 HREF="summary.html">5.12 Summary</A>
</UL>
<!--End of Table of Child-Links-->
<p>
<div class=navigation><hr><table align=center width="100%" cellpadding=0 cellspacing=2>
<tr>
<td><A HREF="conversions.html"><img width=32 height=32 align=bottom border=0 alt="next"
 src="../icons/next.gif"></A></td>
<td><A HREF="ref.html"><img width=32 height=32 align=bottom border=0 alt="up"
 src="../icons/up.gif"></A></td>
<td><A HREF="exceptions.html"><img width=32 height=32 align=bottom border=0 alt="previous"
 src="../icons/previous.gif"></A></td>
<td align=center bgcolor="#99CCFF" width="100%">
 <b class=title>Python Reference Manual</b></td>
<td><A HREF="contents.html"><img width=32 height=32 align=bottom border=0 alt="contents"
 src="../icons/contents.gif"></A></td>
<td><img width=32 height=32 align=bottom border=0 alt=""
 src="../icons/blank.gif"></td>
<td><A HREF="genindex.html"><img width=32 height=32 align=bottom border=0 alt="index"
 src="../icons/index.gif"></A></td>
</tr></table><b class=navlabel>Next:</b> <span class=sectref><A HREF="conversions.html">5.1 Arithmetic conversions</A></span>
<b class=navlabel>Up:</b> <span class=sectref><A HREF="ref.html">Python Reference Manual</A></span>
<b class=navlabel>Previous:</b> <span class=sectref><A HREF="exceptions.html">4.2 Exceptions</A></span>
</div>
<!--End of Navigation Panel-->
<ADDRESS>
<hr>Send comments on this document to <a href="mailto:python-docs@python.org">python-docs@python.org</a>.
</ADDRESS>
</BODY>
</HTML>
