Mark Lawrence wrote:
> On 17/07/2010 20:38, Mick Krippendorf wrote:
>>
>> If Java were *really* a multiple dispatch language, it wouldn't be
>> necessary to repeat the accept-code for every subclass. Instead a single
>> accept method in the base class would suffice. In fact, with true
>> multiple d
On 17/07/2010 20:38, Mick Krippendorf wrote:
Karsten Wutzke wrote:
The visitor pattern uses single-dispatch, that is, it determines
which method to call be the type of object passed in.
Say, in Python, I have an object o and want to call one of it's methods,
say m. Then which of possibly many
Hello,
Am 16.07.2010 09:52, Michele Simionato wrote:
> [os.path.walk vs os.walk]
> There is a big conceptual difference between os.path.walk and os.walk.
> The first works like a framework: you pass a function to it and
> os.path.walk is in charging of calling it when needed. The second works
> li
Karsten Wutzke wrote:
> The visitor pattern uses single-dispatch, that is, it determines
> which method to call be the type of object passed in.
Say, in Python, I have an object o and want to call one of it's methods,
say m. Then which of possibly many methods m to call is determined by
the type
On 07/16/2010 11:00 AM, Jean-Michel Pichavant wrote:
> Karsten Wutzke wrote:
>>> Yes, typo, I meant strictly.
>>>
>>>
>>
>> Damn, I mean strongly. At least not for identifying which methods to
>> call depending on the type/s.
>>
>> Karsten
>>
> Stringly is the perfect combination of strictl
Karsten Wutzke wrote:
Yes, typo, I meant strictly.
Damn, I mean strongly. At least not for identifying which methods to
call depending on the type/s.
Karsten
Stringly is the perfect combination of strictly and strongly. Nice one :)
JM
--
http://mail.python.org/mailman/listinfo/pytho
Carl Banks, 16.07.2010 07:50:
On Jul 15, 8:33 pm, Stefan Behnel wrote:
The code I referenced is from the Cython compiler, and we use it to "do
stuff" with the AST. The visitor pattern is actually a pretty common way to
bind code in a single place that does a certain thing to different parts of
a
On Jul 15, 7:58 pm, Karsten Wutzke wrote:
> Hello,
>
> this is obviously a Python OO question:
>
> Since Python isn't stringly typed, single-dispatch isn't available per
> se. So is the "double-dispatch" Visitor pattern, which is usually used
> in OO systems to implement code generators. So, what
On Jul 15, 8:33 pm, Stefan Behnel wrote:
> Carl Banks, 16.07.2010 01:14:
>
>
>
>
>
> > Around these parts, we consider the main use of most Design Patterns
> > to be to work around limitations of other languages. Visitor Pattern
> > is probably the worst example of it.
>
> > In Python it's comple
Karsten Wutzke writes:
> Since Python isn't stringly typed, single-dispatch isn't available per
> se. So is the "double-dispatch" Visitor pattern, which is usually used
> in OO systems to implement code generators. So, what is the de facto
> method in Python to handle source code generation?
A mi
Carl Banks, 16.07.2010 01:14:
Around these parts, we consider the main use of most Design Patterns
to be to work around limitations of other languages. Visitor Pattern
is probably the worst example of it.
In Python it's completely unnecessary (at least in its boilerplate-
heavy incarnation as u
On Jul 15, 11:45 am, Karsten Wutzke wrote:
> On 15 Jul., 20:28, Thomas Jollans wrote:
>
> > On 07/15/2010 07:58 PM, Karsten Wutzke wrote:
>
> > > Hello,
>
> > > this is obviously a Python OO question:
>
> > > Since Python isn't stringly typed,
>
> > I expect this is an innocent typo, and you mean
On 15/07/2010 18:58, Karsten Wutzke wrote:
Hello,
this is obviously a Python OO question:
Since Python isn't stringly typed, single-dispatch isn't available per
se. So is the "double-dispatch" Visitor pattern, which is usually used
in OO systems to implement code generators. So, what is the de
On 15/07/2010 18:58, Karsten Wutzke wrote:
Hello,
this is obviously a Python OO question:
Since Python isn't stringly typed, single-dispatch isn't available per
se. So is the "double-dispatch" Visitor pattern, which is usually used
in OO systems to implement code generators. So, what is the de
MRAB, 15.07.2010 21:33:
Stefan Behnel wrote:
Karsten Wutzke, 15.07.2010 20:45:
Well, I'm most experienced in OO, so writing OO in Python seems like
the way to start with Python. The visitor pattern uses single-
dispatch, that is, it determines which method to call be the type of
object passed i
Karsten Wutzke web.de> writes:
> So, what is the de facto method in Python to handle source code generation?
Take a look at the NodeVisitor class in the ast module in python 2.6+.
The visitor pattern is implemented in the python standard library.
Matt
--
http://mail.python.org/mailman/listi
Stefan Behnel wrote:
Karsten Wutzke, 15.07.2010 20:45:
Well, I'm most experienced in OO, so writing OO in Python seems like
the way to start with Python. The visitor pattern uses single-
dispatch, that is, it determines which method to call be the type of
object passed in.
Well, then do that.
Karsten Wutzke, 15.07.2010 21:00:
Yes, typo, I meant strictly.
Damn, I mean strongly. At least not for identifying which methods to
call depending on the type/s.
I think you meant "statically typed".
http://c2.com/cgi-bin/wiki?StronglyTyped
http://www.c2.com/cgi/wiki?StaticTyping
Stefan
--
Karsten Wutzke, 15.07.2010 20:45:
Well, I'm most experienced in OO, so writing OO in Python seems like
the way to start with Python. The visitor pattern uses single-
dispatch, that is, it determines which method to call be the type of
object passed in.
Well, then do that. Put the types into a d
On 07/15/2010 08:45 PM, Karsten Wutzke wrote:
> On 15 Jul., 20:28, Thomas Jollans wrote:
>> On 07/15/2010 07:58 PM, Karsten Wutzke wrote:
>>
>>> Hello,
>>
>>> this is obviously a Python OO question:
>>
>>> Since Python isn't stringly typed,
>>
>> I expect this is an innocent typo, and you mean str
>
> Yes, typo, I meant strictly.
>
Damn, I mean strongly. At least not for identifying which methods to
call depending on the type/s.
Karsten
--
http://mail.python.org/mailman/listinfo/python-list
On 15 Jul., 20:28, Thomas Jollans wrote:
> On 07/15/2010 07:58 PM, Karsten Wutzke wrote:
>
> > Hello,
>
> > this is obviously a Python OO question:
>
> > Since Python isn't stringly typed,
>
> I expect this is an innocent typo, and you mean strictly.
>
> > single-dispatch isn't available per se. S
> Since Python isn't stringly typed, single-dispatch isn't available per
> se. So is the "double-dispatch" Visitor pattern, which is usually used
> in OO systems to implement code generators. So, what is the de facto
> method in Python to handle source code generation?
Do you mean strongly typed l
On 07/15/2010 07:58 PM, Karsten Wutzke wrote:
> Hello,
>
> this is obviously a Python OO question:
>
> Since Python isn't stringly typed,
I expect this is an innocent typo, and you mean strictly.
> single-dispatch isn't available per se. So is the "double-dispatch" Visitor
> pattern,
Wait, wh
Hello,
this is obviously a Python OO question:
Since Python isn't stringly typed, single-dispatch isn't available per
se. So is the "double-dispatch" Visitor pattern, which is usually used
in OO systems to implement code generators. So, what is the de facto
method in Python to handle source code
25 matches
Mail list logo