A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-September/082389.html below:

[Python-Dev] ',' precedence in documentation

[Python-Dev] ',' precedence in documentationC. Titus Brown ctb at msu.edu
Sun Sep 14 21:31:01 CEST 2008
Hi folks,

over on the pygr list, we were recently discussing a mildly confusing
edit I made:

   assert 'seq1' in self.db, self.db.keys() 

This was interpreted by someone as being

   assert 'seq1' in (self.db, self.db.keys())

which is very different from the actual meaning,

   assert ('seq1' in self.db), self.db.keys()

where 'self.db.keys()' serves as the message to be printed out when the
assertion fails.  Apart from questions of why I was apparently out to
confuse people with this edit, the question of ',' precedence came up.
Looking at

	http://docs.python.org/ref/summary.html

there's no mention of ',' binding and tuple creation vs the other
operators.  I'm not really sure how to think of it but it seems like
this is something that could be cleared up in the docs with a brief note
somewhere.  Thoughts?

cheers,
--titus
-- 
C. Titus Brown, ctb at msu.edu
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4