Georg Brandl writes:
> Am 26.07.2010 10:59, schrieb Anders Sandvig:
> > On Sat, Jul 24, 2010 at 3:31 AM, Gregory P. Smith wrote:
> >> Yuck. Anyone who feels they need a variable named the same a reserved
> >> word
> >> simply feels wrong and needs reeducation. [...]
> >
> > While I agre
Am 26.07.2010 10:59, schrieb Anders Sandvig:
> On Sat, Jul 24, 2010 at 3:31 AM, Gregory P. Smith wrote:
>> Yuck. Anyone who feels they need a variable named the same a reserved word
>> simply feels wrong and needs reeducation. [...]
>
> While I agree with you in principle, I have been finding i
On Sat, Jul 24, 2010 at 3:31 AM, Gregory P. Smith wrote:
> Yuck. Anyone who feels they need a variable named the same a reserved word
> simply feels wrong and needs reeducation. [...]
While I agree with you in principle, I have been finding it
frustrating trying to calculate yield in my financi
So OK, thank you for response.
No, I wasn't joking. I'm sorry, I didn't know that you Python guys get offended
from being compared to PHP or Perl. Perhaps that shouldn't surprise me, though.
I have posted all of this here, because I was hoping this feature would be
implemented secretly, with
hose
> which happen to be keywords.
>
> I've suggested :name, which doesn't break old code, and doesn't require
> using any new punctuation. Syntax would not change,
> just the lexical definition of 'identifier'. If the intent is to allow
> arbitrary names
On 23/07/10 04:24, gregory.smi...@sympatico.ca wrote:
I've suggested :name, which doesn't break old code,
I'm not so sure about that. Consider
foo[a::b]
Do you parse that as a 3-element slice, or as a
2-element slice with :b as the second element?
--
Greg
Am 22.07.2010 21:49, schrieb Reid Kleckner:
> On Thu, Jul 22, 2010 at 11:49 AM, Alexander Belopolsky
> wrote:
>> On Thu, Jul 22, 2010 at 12:53 PM, wrote:
>>> 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...
>>
> Date: Thu, 22 Jul 2010 14:49:17 -0400
> Subject: Re: [Python-Dev] Set the namespace free!
> From: alexander.belopol...@gmail.com
> To: gregory.smi...@sympatico.ca
> CC: python-dev@python.org
>
> On Thu, Jul 22, 2010 at 12:53 PM, wrote:
> ..
> > So, ::name
On 7/22/2010 2:04 PM, John Nagle wrote:
From: Bartosz Tarnowski
Python has more and more reserved words over time
...
What should I do then, when the attribute is a reserver word?
I am going to be a grinch and note that this is strictly a usage
question with no development implications.
On Thu, Jul 22, 2010 at 11:49 AM, Alexander Belopolsky
wrote:
> On Thu, Jul 22, 2010 at 12:53 PM, wrote:
>> 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
> Using "setattr" to set attributes, where the attribute string
> comes from an external source, can create a security hole. Remember
> that you can override functions on an object, for that object only,
> by setting an attribute. This offers the opportunity for an attack
> similar to SQL in
> Using "setattr" to set attributes, where the attribute string
> comes from an external source, can create a security hole. Remember
> that you can override functions on an object, for that object only,
> by setting an attribute. This offers the opportunity for an attack
> similar to SQL in
On Thu, Jul 22, 2010 at 12:53 PM, 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
I have no idea why my last post was a copy of the previous one. Webmail choking
on a hairball.
It was supposed to say:
===
Oops, :name does break things, e.g.
if x :return
So, ::name or &name or |name or whatever.
I'm very amused by all the jokes about turning python into perl
On 7/22/2010 5:45 AM, python-dev-requ...@python.org wrote:
Message: 10
Date: Thu, 22 Jul 2010 16:04:00 +0200
From: Bartosz Tarnowski
To:python-dev@python.org
Subject: [Python-Dev] Set the namespace free!
Message-ID:<4c484fd0.2080...@zlotniki.pl>
Content-Type: text/plain; charset=UTF-8; format=flo
oops, :name does break things, e.g
if x :return
So, it could be ::name or |name or &name or !name or whatever.
From: gregory.smi...@sympatico.ca
To: python-dev@python.org
Subject: RE: [Python-Dev] Set the namespace free!
Date: Thu, 22 Jul 2010 16:24:27 +
I agree with
work better (and is consistent with existing stuff).
> Date: Thu, 22 Jul 2010 10:41:39 -0400
> From: jnol...@gmail.com
> To: bartosz-tarnow...@zlotniki.pl
> CC: python-dev@python.org
> Subject: Re: [Python-Dev] Set the namespace free!
>
> On Thu, Jul 22, 2010 at 10:04 AM, B
>
> !for boo in foo:
!if boo is !None:
!print(hoo)
!else:
!return !sorted(woo)
I feel most people could not bear such a difficult syntax. Why have I to
type so much '!'s ?
On Thu, Jul 22, 2010 at 10:04 PM, Bartosz Tarnowski <
bartosz-tarnow...@zlotniki.pl> wrote:
>
> Hel
On Thu, Jul 22, 2010 at 10:37 AM, Antoine Pitrou wrote:
> On Thu, 22 Jul 2010 16:54:58 +0100
> Georg Brandl wrote:
>>
>> That also has the advantage of introducing a measure of much needed
>> compatibility with industry-leading web programming languages.
>
> Also, Python would gain much needed fl
On Thu, 22 Jul 2010 16:54:58 +0100
Georg Brandl wrote:
>
> You raise a good point. However, I'd rather explicitly signify names instead
> of keywords:
>
> for $boo in $foo:
> if $boo is $None:
> print($hoo)
> else:
> return sorted($woo)
>
> That also has the advantage o
On Thu, Jul 22, 2010 at 11:54 AM, Georg Brandl wrote:
..
> That also has the advantage of introducing a measure of much needed
> compatibility with industry-leading web programming languages.
Looks like our messages crossed in flight.
pathologically-eclecticly-yours
_
On Thu, Jul 22, 2010 at 10:41 AM, Jesse Noller wrote:
..
> I'm not a fan of this - I'd much prefer[1] that we use the exclamation
> point to determine scope:
>
> foobar - local
> !foobar - one up
> !!foobar - higher than the last one
> !!!foobar - even higher in scope
>
> We could do the inverse a
On Thu, Jul 22, 2010 at 10:04 AM, Bartosz Tarnowski <
bartosz-tarnow...@zlotniki.pl> wrote:
>
> Let all reserved words be preceded with some symbol, i.e. "!" (exclamation
> mark). This goes also for standard library global identifiers.
>
> !for boo in foo:
>!if boo is !None:
>!print(hoo
Am 22.07.2010 15:04, schrieb Bartosz Tarnowski:
>
> Hello, guys.
>
> Python has more and more reserved words over time. It becomes quite annoying,
> since you can not use variables and attributes of such names. Suppose I want
> to
> make an XML parser that reads a document and returns an objec
On Thu, Jul 22, 2010 at 10:04 AM, Bartosz Tarnowski
wrote:
>
> Hello, guys.
>
> Python has more and more reserved words over time. It becomes quite
> annoying, since you can not use variables and attributes of such names.
> Suppose I want to make an XML parser that reads a document and returns an
On 22 July 2010 14:14, Xavier Morel wrote:
> getattr(elem, 'param') I believe, rather than elem.getattr('param')
Doh! You're absolutely right, of course.
--
Cheers,
Simon B.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mail
On 2010-07-22, at 14:45 , Simon Brunning wrote:
> On 22 July 2010 15:04, Bartosz Tarnowski
> wrote:
>> What should I do then, when the attribute is a reserver word?
>
> You would use elem.getattr('param'). That's what it's for.
getattr(elem, 'param') I believe, rather than elem.getattr('param'
On Thu, 22 Jul 2010, Bartosz Tarnowski wrote:
[]
My proposal: let's make a syntax change.
I'm pretty sure this belongs on python-ideas.
Let all reserved words be preceded with some symbol, i.e. "!" (exclamation
mark). This goes also for standard library global identifiers.
!for boo in
On 22 July 2010 15:04, Bartosz Tarnowski wrote:
> What should I do then, when the attribute is a reserver word?
You would use elem.getattr('param'). That's what it's for.
> Let all reserved words be preceded with some symbol, i.e. "!" (exclamation
> mark).
Oh, God, no.
This would be better off
29 matches
Mail list logo