On 2022-03-25 10:12, jlfivn wrote:
On Monday, 24 November 2003 at 23:54:49 UTC, John Roth wrote:
"Hung Jung Lu" wrote in message
news:8ef9bea6.03112...@posting.google.com...
> Skip Montanaro wrote in message
news:...
> >
> I come back again to repeat it one more time: the compile() function
>
On Monday, 24 November 2003 at 23:54:49 UTC, John Roth wrote:
> "Hung Jung Lu" wrote in message
> news:8ef9bea6.03112...@posting.google.com...
> > Skip Montanaro wrote in message
> news:...
> > >
> > I come back again to repeat it one more time: the compile() function
> > already exists and works
Chris Angelico wrote:
> On Tue, May 12, 2015 at 2:01 AM, Peter Otten <__pete...@web.de> wrote:
>> Though interestingly, my Py2 doesn't have any help
>>> on exec:
>>>
>> help('exec')
>>> no documentation found for 'exec'
>>>
>>> Not sure why that is.
>>
>> Path confusion? You may accidentally b
On Monday, May 11, 2015 at 11:08:14 AM UTC-5, Chris Angelico wrote:
> On Tue, May 12, 2015 at 2:01 AM, Peter Otten <__pete...@web.de> wrote:
> > Though interestingly, my Py2 doesn't have any help
> >> on exec:
> >>
> > help('exec')
> >> no documentation found for 'exec'
> >>
> >> Not sure why t
On Tue, May 12, 2015 at 2:01 AM, Peter Otten <__pete...@web.de> wrote:
> Though interestingly, my Py2 doesn't have any help
>> on exec:
>>
> help('exec')
>> no documentation found for 'exec'
>>
>> Not sure why that is.
>
> Path confusion? You may accidentally be importing Python 3's topics.
> T
Chris Angelico wrote:
> On Tue, May 12, 2015 at 1:22 AM, zipher wrote:
>> Ah, yeah, I guess that does it. But (shame) it looks like you've gone
>> past the BDFL. Try:
>>
> help(exec)
>> ^
>> SyntaxError: invalid syntax
>>
>
> That's because, in the version of Python you're usin
On Tue, May 12, 2015 at 1:22 AM, zipher wrote:
> Ah, yeah, I guess that does it. But (shame) it looks like you've gone past
> the BDFL. Try:
>
help(exec)
> ^
> SyntaxError: invalid syntax
>
That's because, in the version of Python you're using, exec is a
keyword. You could swi
On Monday, May 11, 2015 at 10:22:15 AM UTC-5, zipher wrote:
> Ah, yeah, I guess that does it. But (shame) it looks like you've gone past
> the BDFL. Try:
> [...]
> Better
Oops, omit word "better". Sent before reading over it again...
m
--
https://mail.python.org/mailman/listinfo/python-list
On Sunday, May 10, 2015 at 10:32:07 PM UTC-5, Ian wrote:
> On Sun, May 10, 2015 at 7:39 PM, zipher wrote:
> > Similarly, you'd want:
> >
> encode(codestr)
> >
> > to instantiate all objects in the codestr. You can't do this with eval,
> > because it doesn't allow assignment (eval(n=2) retur
On Monday, May 11, 2015 at 9:02:07 AM UTC+5:30, Ian wrote:
> Is exec what you're looking for?
Now Now Ian!
In classical times, corrupting the youth would fetch you a cup of hemlock.
Community service it is nowadays.
--
https://mail.python.org/mailman/listinfo/python-list
On Sun, May 10, 2015 at 9:31 PM, Ian Kelly wrote:
> On Sun, May 10, 2015 at 7:39 PM, zipher wrote:
>> Similarly, you'd want:
>>
> encode(codestr)
>>
>> to instantiate all objects in the codestr. You can't do this with eval,
>> because it doesn't allow assignment (eval(n=2) returns "InvalidS
On Sun, May 10, 2015 at 7:39 PM, zipher wrote:
> Similarly, you'd want:
>
encode(codestr)
>
> to instantiate all objects in the codestr. You can't do this with eval,
> because it doesn't allow assignment (eval(n=2) returns "InvalidSyntax").
Is exec what you're looking for?
>>> exec('n = 2
> I'm thinking how interesting it would be to add code blocks to Python, so
> that arbitrary strings of code can be passed around. It would open up some
> interesting possibilities for self-modifying code and generic programming.
>
> My suggestion would be to use triple double-quoted strings
"Dr. John Q. Hacker" writes:
> I'm thinking how interesting it would be to add code blocks to Python,
> so that arbitrary strings of code can be passed around. It would open
> up some interesting possibilities for self-modifying code and generic
> programming.
>
> Since Python has already a pleth
14 matches
Mail list logo