Re: on slices, negative indices, which are the equivalent procedures?

2021-08-20 Thread Hope Rouselle
Hope Rouselle writes: > Hope Rouselle writes: > >> Dennis Lee Bieber writes: >> >>> On Sun, 15 Aug 2021 00:05:29 -0300, Jack Brandom >>> declaimed the following: >>> Dennis Lee Bieber writes: >>> > subscript: '.' '.' '.' | test | [test] ':' [test] [sliceop] > sliceop: ':' [te

Re: on slices, negative indices, which are the equivalent procedures?

2021-08-20 Thread Hope Rouselle
Hope Rouselle writes: > Dennis Lee Bieber writes: > >> On Sun, 15 Aug 2021 00:05:29 -0300, Jack Brandom >> declaimed the following: >> >>>Dennis Lee Bieber writes: >>> >> subscript: '.' '.' '.' | test | [test] ':' [test] [sliceop] sliceop: ':' [test] >> >>> >>>This is looking less re

Re: on perhaps unloading modules?

2021-08-20 Thread Hope Rouselle
Greg Ewing writes: > On 21/08/21 6:15 am, Hope Rouselle wrote: > code() >> 'def p():\n import math\n return math.e\n' > exec(code()) > p >> > p() >> 2.718281828459045 > > Note that this pollutes the globals of the module that you're calling > exec() from. For better isolation y

Re: on perhaps unloading modules?

2021-08-20 Thread Greg Ewing
On 21/08/21 6:15 am, Hope Rouselle wrote: code() 'def p():\n import math\n return math.e\n' exec(code()) p p() 2.718281828459045 Note that this pollutes the globals of the module that you're calling exec() from. For better isolation you can pass in an explicit globals dict: g = {} exec

Re: ANN: Dogelog Runtime, Prolog to the Moon (2021)

2021-08-20 Thread Mostowski Collapse
We = Me and my cat named socrates The cat is a very good programmer: def meow(): print("meow meow, Prolog is not only SWI-Prolog") Julio Di Egidio schrieb: On Sunday, 15 August 2021 at 14:43:42 UTC+2, Mostowski Collapse wrote: Yesterday we went into a little programming binge Who is this

Re: on perhaps unloading modules?

2021-08-20 Thread Hope Rouselle
Chris Angelico writes: > On Tue, Aug 17, 2021 at 4:02 AM Greg Ewing > wrote: >> The second best way would be to not use import_module, but to >> exec() the student's code. That way you don't create an entry in >> sys.modules and don't have to worry about somehow unloading the >> module. > > I w

Re: on slices, negative indices, which are the equivalent procedures?

2021-08-20 Thread Hope Rouselle
Dennis Lee Bieber writes: > On Sun, 15 Aug 2021 00:05:29 -0300, Jack Brandom > declaimed the following: > >>Dennis Lee Bieber writes: >> > >>> subscript: '.' '.' '.' | test | [test] ':' [test] [sliceop] >>> sliceop: ':' [test] > >> >>This is looking less readable, so, no, I prefer that previous

Re: some problems for an introductory python test

2021-08-20 Thread Hope Rouselle
Dennis Lee Bieber writes: > On Sun, 15 Aug 2021 00:15:58 -0300, Hope Rouselle > declaimed the following: > > Giganews seems to have just vomited up three days worth of traffic... > >>Dennis Lee Bieber writes: >> >>> >>> Granted, the fact that the Amiga used a shared common address spa

Re: port to PDOS (especially mainframe)

2021-08-20 Thread Paul Edwards
On Saturday, April 17, 2021 at 11:12:38 PM UTC+10, Paul Edwards wrote: > https://github.com/s390guy/SATK/commits/master/README > > and I can see that on 2014-08-13 he cited 3.3 as an > explicit requirement. Note that the work I was doing to make a C90-compliant version of Python 3.3 hasn't pr

Making command-line args available to deeply-nested functions

2021-08-20 Thread Loris Bennett
Hi, TL;DR: If I have a command-line argument for a program, what is the best way of making this available to a deeply-nested[1] function call without passing the parameter through every intermediate function? Long version: If I have, say, a command-line program to send an email with a personali

Re: Making command-line args available to deeply-nested functions

2021-08-20 Thread Loris Bennett
Julio Di Egidio writes: > On Friday, 20 August 2021 at 11:54:00 UTC+2, Loris Bennett wrote: >> Hi, >> >> TL;DR: >> >> If I have a command-line argument for a program, what is the best way >> of making this available to a deeply-nested[1] function call without >> passing the parameter throug