Peng Yu wrote:
Does anybody know what is the correct way to evaluation python
code that contains `def`? Thanks.
Here's one way to do it:
env = {}
exec(s, env, env)
Now env['f'] contains the defined function, which you can then
call, disassemble or whatever you want.
--
Greg
--
https://
On Monday 29 May 2017 06:16 CEST, Cecil Westerhof wrote:
>> I'm completely flummoxed then; on my machines I get the 'old'
>> behavior. Can you try a completely clean Debian install somewhere
>> (maybe on a virtual box) and see what happens? I'm wondering if
>> there is something going on with your
On Monday 29 May 2017 02:45 CEST, Cem Karan wrote:
>
> On May 27, 2017, at 11:10 AM, Cecil Westerhof wrote:
>
>> On Saturday 27 May 2017 16:34 CEST, Cem Karan wrote:
>>
>>>
>>> On May 27, 2017, at 7:15 AM, Cecil Westerhof wrote:
>>>
On Saturday 27 May 2017 12:33 CEST, Cecil Westerhof wrote:
Steve D'Aprano writes:
> #!/usr/bin/env python
> # fileencoding=utf-8:
> # vim: set noexpandtab tabstop=2 shiftwidth=2 softtabstop=-1
Even better, the source code encoding declaration for Python is
compatible with a Vim text encoding declaration. So you can just do one:
=
#! /usr/bin/env py
On Mon, 29 May 2017 11:03 am, Peng Yu wrote:
> Hi,
>
> I got the following error when I try to eval the following code with
> def. Does anybody know what is the correct way to evaluation python
> code that contains `def`? Thanks.
>
> $ cat ./main.py
> #!/usr/bin/env python
> # vim: set noexpandt
On 2017-05-29 02:03, Peng Yu wrote:
Hi,
I got the following error when I try to eval the following code with
def. Does anybody know what is the correct way to evaluation python
code that contains `def`? Thanks.
$ cat ./main.py
#!/usr/bin/env python
# vim: set noexpandtab tabstop=2 shiftwidth=2
On 2017-05-29, Peng Yu wrote:
> I got the following error when I try to eval the following code with
> def. Does anybody know what is the correct way to evaluation python
> code that contains `def`? Thanks.
exec
--
https://mail.python.org/mailman/listinfo/python-list
Hi,
I got the following error when I try to eval the following code with
def. Does anybody know what is the correct way to evaluation python
code that contains `def`? Thanks.
$ cat ./main.py
#!/usr/bin/env python
# vim: set noexpandtab tabstop=2 shiftwidth=2 softtabstop=-1 fileencoding=utf-8:
im
On May 27, 2017, at 11:10 AM, Cecil Westerhof wrote:
> On Saturday 27 May 2017 16:34 CEST, Cem Karan wrote:
>
>>
>> On May 27, 2017, at 7:15 AM, Cecil Westerhof wrote:
>>
>>> On Saturday 27 May 2017 12:33 CEST, Cecil Westerhof wrote:
>>>
I wrote a script to run as a cron job to check i
‘انا عاوز اعرف نتيجتي انا واخويه رفم جلوسي ورقم جلوس اخويه 41779.41752
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, 29 May 2017 12:15 am, Jon Ribbens wrote:
> On 2017-05-28, Steve D'Aprano wrote:
>> What exactly did you think I got wrong?
>
> 3.6 does preserve the dict order. It isn't a guarantee so may change
> in future versions, but it is what 3.6 actually does.
Did I say it didn't?
I said you ca
On May 28, 2017 8:23 AM, "Jon Ribbens" wrote:
> On 2017-05-28, Steve D'Aprano wrote:
>> What exactly did you think I got wrong?
>
> 3.6 does preserve the dict order. It isn't a guarantee so may change
> in future versions, but it is what 3.6 actually does.
No, it's what CPython 3.6 actually does
On 2017-05-28, Steve D'Aprano wrote:
> What exactly did you think I got wrong?
3.6 does preserve the dict order. It isn't a guarantee so may change
in future versions, but it is what 3.6 actually does.
>> If you're asking "given a fixed Python version, and where appropriate
>> PYTHONHASHSEED=0,
On Sun, 28 May 2017 11:12 pm, Jon Ribbens wrote:
> On 2017-05-28, Bill Deegan wrote:
>> As a follow up to a discussion on IRC #python channel today.
>>
>> Assuming the same order of insertions of the same items to a dictionary
>> would the iteration of a dictionary be the same (not as the order o
On 2017-05-28, Bill Deegan wrote:
> As a follow up to a discussion on IRC #python channel today.
>
> Assuming the same order of insertions of the same items to a dictionary
> would the iteration of a dictionary be the same (not as the order of
> insertion, just from run to run) for Python 2.7 up t
15 matches
Mail list logo