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/2010-July/102237.html below:

[Python-Dev] Set the namespace free!

[Python-Dev] Set the namespace free!gregory.smith3 at sympatico.ca gregory.smith3 at sympatico.ca
Thu Jul 22 23:01:37 CEST 2010
> Date: Thu, 22 Jul 2010 14:49:17 -0400
> Subject: Re: [Python-Dev] Set the namespace free!
> From: alexander.belopolsky at gmail.com
> To: gregory.smith3 at sympatico.ca
> CC: python-dev at python.org
> 
> On Thu, Jul 22, 2010 at 12:53 PM,  <gregory.smith3 at sympatico.ca> wrote:
> ..
> > So, ::name or &name or |name or whatever.
> >
> > I'm very amused by all the jokes about turning python into perl, but there's
> > a good idea here that doesn't actually require that...
> 
> No, there isn't.  And both '&' and '|' are valid python operators that
> cannot be used this way.
> 

Um, of course. Serious brain freeze today, using too many languages at once. Yeah, that's it.

Despite my knuckleheadedness, I say there's still a hole here that can be easily plugged. it's clumsy that you can't call, e.g.

GenerateURL( reqtype='basic', class='local')  

other than by

GenerateURL(  **{'reqtype': 'basic', 'class': 'local'})

... just because 'class' is a keyword.  That's letting a parser issue degrade the value of a really good feature. Likewise for attributes; python allows you to have
named parameters or attributes called 'class' and 'import' if you like; it just doesn't let you write them directly; this restriction doesn't seem to be necessary except for the parse issue, which is fixable. I.e. nothing would break by allowing GenerateURL(::class = 'local') or    Request.::class.
 
See my previous longer post for the full discussion (not the short stupid one).









 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100722/e509214c/attachment-0001.html>
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