On Tue, Feb 17, 2015 at 7:31 AM, Steven D'Aprano wrote:
> On Mon, Feb 16, 2015 at 07:10:21PM -0800, Devin Jeanpierre wrote:
>> On Mon, Feb 16, 2015 at 6:15 PM, Steven D'Aprano wrote:
>> > Here is a fork of that recipe. It uses an inner class for the new
>> > namedtuple class. The only thing which
On Mon, Feb 16, 2015 at 07:10:21PM -0800, Devin Jeanpierre wrote:
> On Mon, Feb 16, 2015 at 6:15 PM, Steven D'Aprano wrote:
> > Here is a fork of that recipe. It uses an inner class for the new
> > namedtuple class. The only thing which needs exec is the __new__ method.
> >
> > http://code.actives
On Mon, Feb 16, 2015 at 7:20 PM, Cameron Simpson wrote:
> One might use exec() to use code that is valid in one python version but not
> another, when you need your program to run in both i.e. to get code that is
> syntacticly invalid in one version, but to use it (conditionally) in another
> vers
On 16Feb2015 19:10, Devin Jeanpierre wrote:
On Mon, Feb 16, 2015 at 6:15 PM, Steven D'Aprano wrote:
Here is a fork of that recipe. It uses an inner class for the new
namedtuple class. The only thing which needs exec is the __new__ method.
http://code.activestate.com/recipes/578918-yet-another
On Mon, Feb 16, 2015 at 6:15 PM, Steven D'Aprano wrote:
> Here is a fork of that recipe. It uses an inner class for the new
> namedtuple class. The only thing which needs exec is the __new__ method.
>
> http://code.activestate.com/recipes/578918-yet-another-namedtuple/
>
> This demonstrates a powe
On Mon, Feb 16, 2015 at 01:52:16PM -0600, boB Stepp wrote:
> I have heard periodically about the potential evils of using exec()
> and eval(), including today, on this list. I gather that the first
> requirement for safely using these functions is that the passed
> argument MUST be from a trusted
On Mon, Feb 16, 2015 at 11:52 AM, boB Stepp wrote:
> I have heard periodically about the potential evils of using exec()
> and eval(), including today, on this list. I gather that the first
> requirement for safely using these functions is that the passed
> argument MUST be from a trusted source.
I have heard periodically about the potential evils of using exec()
and eval(), including today, on this list. I gather that the first
requirement for safely using these functions is that the passed
argument MUST be from a trusted source. So what would be examples
where the use of these functions