Scott David Daniels wrote:
I am afraid it will make it too easy to define functions in other
modules remotely, a tempting sharp stick to poke your eye out with.
It's not very hard at the moment, and I don't see lots of eyes flying
by. I don't know about Ruby where monkeypatching seems to be
On Thu, 23 Apr 2009 10:48:57 -0700, Scott David Daniels wrote:
I am afraid it will make it too easy to define functions in other
modules remotely, a tempting sharp stick to poke your eye out with.
It's not terribly difficult to do so already:
def spam():
... return spam spam spam
...
Marco Mariani wrote:
Scott David Daniels wrote:
I am afraid it will make it too easy to define functions in other
modules remotely, a tempting sharp stick to poke your eye out with.
Imagine debugging a pile of code that includes a module with:
import random
def random.random():
Hi. I'm sure there've been debates about this before, but I can't seem
to figure out what to search for to pull them up, so I'm asking here.
It seems to me that a lot of things could be made much easier if you
could use primaries other than basic identifiers for the target of
function
Jeremy Banks wrote:
Hi. I'm sure there've been debates about this before, but I can't seem
to figure out what to search for to pull them up, so I'm asking here.
It seems to me that a lot of things could be made much easier if you
could use primaries other than basic identifiers for the target
Thanks for your comments.
On Thu, Apr 23, 2009 at 11:52, Gary Herron gher...@islandtraining.com wrote:
[...]
There's no need for a specific addition to the syntax to do this.
Try this:
def foo_bar():
return(...)
foo.bar = foo_bar
[...]
and this:
def foo_bar():
Jeremy Banks was kind enough to say:
Hi. I'm sure there've been debates about this before, but I can't seem
to figure out what to search for to pull them up, so I'm asking here.
I'm not exactly sure what you mean... if you want to add functions to
another fuction, just do it this way:
def
Jeremy Banks wrote:
Thanks for your comments.
On Thu, Apr 23, 2009 at 11:52, Gary Herron gher...@islandtraining.com wrote:
[...]
There's no need for a specific addition to the syntax to do this.
Try this:
def foo_bar():
return(...)
foo.bar = foo_bar
[...]
Things like your suggestion are called syntactic-sugar -- syntax that
adds a convenience, but *no* new functionality. Python has plenty of
syntactic-sugars, and more will be added in the future. To make an
argument for such an addition, one would have to describe some compelling
(and
On Thu, Apr 23, 2009 at 13:03, John Krukoff jkruk...@ltgc.com wrote:
You probably want to be searching for multi-line lambda to find the past
decade or so of this argument, as that's where most people who argued
for this came from. But, if you'd just like a bit of discouragement,
here's GvR
On Thu, 2009-04-23 at 12:26 -0300, Jeremy Banks wrote:
Things like your suggestion are called syntactic-sugar -- syntax that
adds a convenience, but *no* new functionality. Python has plenty of
syntactic-sugars, and more will be added in the future. To make an
argument for such an
Jeremy Banks wrote:
I've read those discussion before, but somehow never made the
connection between those and this. I'll give that article a read, it
probably details exactly the perspective I'm looking for. Thank you!
You could also read this:
Jeremy Banks wrote: (proposing def lhs(args): ...
On Thu, Apr 23, 2009 at 11:52, Gary Herron gher...@islandtraining.com wrote:
Try this:
def foo_bar():
return(...)
foo.bar = foo_bar
and this:
def foo_bar():
return(...)
foo[bar] = foo_bar
I understand that this is possible
Jeremy Banks wrote:
Hi. I'm sure there've been debates about this before, but I can't seem
to figure out what to search for to pull them up, so I'm asking here.
It seems to me that a lot of things could be made much easier if you
could use primaries other than basic identifiers for the target
On Apr 23, 5:23 pm, Terry Reedy tjre...@udel.edu wrote:
Jeremy Banks wrote:
Hi. I'm sure there've been debates about this before, but I can't seem
to figure out what to search for to pull them up, so I'm asking here.
It seems to me that a lot of things could be made much easier if you
15 matches
Mail list logo