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/2004-September/048885.html below:

[Python-Dev] ANN: PEP 335: Overloadable Boolean Operators

[Python-Dev] ANN: PEP 335: Overloadable Boolean Operatorsexarkun at divmod.com exarkun at divmod.com
Tue Sep 14 15:32:33 CEST 2004
On Tue, 14 Sep 2004 08:04:45 -0400, Kevin Jacobs <jacobs at theopalgroup.com> wrote:
>Phillip J. Eby wrote:
> 
> > For these reasons, I'd feel more comfortable with either a literal 
> > syntax (to address algebra, SQL, etc.) or some type of special infix 
> > notation to allow new operators to be defined in Python, so that it 
> > isn't necessary to use prefix or method notation to perform operations 
> > like these.  Neither of these solutions burdens applications that 
> > don't need the feature(s).
> 
> Both of your alternatives are being used in some form and
> neither is really satisfactory.  Literal representations require
> complex parsers, when the Python parser is really what is
> desired.
  Python's parser is already available, through the compiler module.  The example given earlier, query("x and y or z"), is relatively straightforward to implement as a set of AST manipulations.
  Jp
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