Changes by Jesús Cea Avión j...@jcea.es:
--
nosy: +jcea
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13899
___
___
Python-bugs-list mailing list
Georg Brandl ge...@python.org added the comment:
r'[\w]' also matches word chars. I find that a very useful property, since you
can easily build classes like '[\w.]' It's also impossible to change this
without breaking lots of regexes. It's also explicitly documented, although
IMO it's not
Ezio Melotti ezio.melo...@gmail.com added the comment:
[\w] should definitely work, but [\B] doesn't seem to match anything useful,
and it just fails silently because it's neither equivalent to \B nor to [B]:
re.match(r'foo\B', 'foobar') # on a non-word-boundary -- matches fine
_sre.SRE_Match
Georg Brandl ge...@python.org added the comment:
Interesting. That shifts the issue, since the current behavior is neither of
the two that make sense. Then it would indeed make the most sense to raise in
these cases.
(I wonder what these patterns actually would match, but I have no time to
John Machin sjmac...@lexicon.net added the comment:
@Ezio: Comparison of the behaviour of \letter inside/outside character classes
is irrelevant. The rules for inside can be expressed simply as:
1. Letters dDsSwW are special; they represent categories as documented, and do
in fact have a
John Machin sjmac...@lexicon.net added the comment:
Whoops: normal Python rules for backslash escapes should have had a note but
revert to the C behaviour of stripping the \ from unrecognised escapes which
is what re appears to do in its own \ handling.
--
at runtime; the switch default has a comment to
the effect that nothing can be done, so pretend that the unknown opcode matched
nothing. Zen?
--
messages: 152194
nosy: sjmachin
priority: normal
severity: normal
status: open
title: re pattern r[\A] should work like A but matches nothing
Ezio Melotti ezio.melo...@gmail.com added the comment:
This happens because \A, \B and \Z are valid escape sequences[0].
If what you mean is that they shouldn't be recognized as such inside a
character class, then I can agree with that.
^ and $ are similar to \A and \Z but they are considered
John Machin sjmac...@lexicon.net added the comment:
@ezio: Of course the context is inside a character class.
I expect r'[\b]' to act like r'\b' aka r'\x08' aka backspace because (1) that
is the treatment applied to all other C-like control char escapes (2) the docs
say so explicitly: Inside
a little apache pattern server log parser
apache_log_parser to share with you at
https://github.com/happy15/apache_log_parser
Hope you like it.
--
http://mail.python.org/mailman/listinfo/python-list
Am 04.11.2011 01:33, schrieb Anthony Kong:
I would like to find out what is the current prevailing view or
consensus (if any) on the use of Design Pattern in python?
My consensus with myself is that design patterns are language-agnostic.
If I write class Foo serves as view and controller
On Nov 3, 6:33 pm, Anthony Kong anthony.hw.k...@gmail.com wrote:
Sorry to resurrect this topic. By google search the last discussion was in
2003.
I would like to find out what is the current prevailing view or consensus (if
any) on the use of Design Pattern in python?
I am doing some
On Fri, Nov 4, 2011 at 8:28 AM, John Roth johnro...@gmail.com wrote:
The first is that if you use TDD (Test Driven Development) and
refactor relentlessly to remove duplication, most of the basic design
patterns will emerge naturally from the code as you work.
I agree, and there is a pretty
On 11/04/2011 12:33 AM, Anthony Kong wrote:
Sorry to resurrect this topic. By google search the last discussion was in 2003.
I would like to find out what is the current prevailing view or consensus (if
any) on the use of Design Pattern in python?
I am doing some 'fact-finding' in this area
On 11/4/2011 8:46 AM, Andrea Crotti wrote:
Well this book is work in progress
Though not touched since May 2009
https://bitbucket.org/BruceEckel/python-3-patterns-idioms/src
but it actually looks very interesting
The slightly older .pdf version is a bit bizarre as parts of both text
and
Search for presentations and videos by Alex Martelli. He's the goto (so
to speak) person on Python design patterns. Here, for instance:
http://code.google.com/edu/languages/#_python_patterns
--
Ned Deily,
n...@acm.org
--
http://mail.python.org/mailman/listinfo/python-list
Sorry to resurrect this topic. By google search the last discussion was in 2003.
I would like to find out what is the current prevailing view or consensus (if
any) on the use of Design Pattern in python?
I am doing some 'fact-finding' in this area on request of my colleagues. Some
of them
is the current prevailing view or consensus (if
any) on the use of Design Pattern in python?
[...]
I myself pretty much subscribe to the view that the nature of python language
actually do away much of the need of the use of DP
To a certain extent, I agree. I don't have a huge amount of experience
On Thu, Nov 3, 2011 at 5:33 PM, Anthony Kong anthony.hw.k...@gmail.com wrote:
Sorry to resurrect this topic. By google search the last discussion was in
2003.
I would like to find out what is the current prevailing view or consensus (if
any) on the use of Design Pattern in python?
I can
Changes by Éric Araujo mer...@netwok.org:
--
assignee: docs@python -
components: -Documentation
nosy: +eric.araujo, ezio.melotti, michael.foord -docs@python
stage: - test needed
type: feature request - behavior
versions: +Python 3.2, Python 3.3
Changes by Michael Foord mich...@voidspace.org.uk:
--
assignee: - michael.foord
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11218
___
___
.
--
messages: 136193
nosy: michael.foord
priority: normal
severity: normal
stage: test needed
status: open
title: re pattern objects have no __class__
type: behavior
versions: Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12099
Roundup Robot devnull@devnull added the comment:
New changeset c9df95b57af3 by Benjamin Peterson in branch '2.7':
stop using the old brain-dead interface for providing attributes/methods
http://hg.python.org/cpython/rev/c9df95b57af3
--
nosy: +python-dev
resolution: - fixed
stage: test
Roundup Robot devnull@devnull added the comment:
New changeset 06cca90ff105 by orsenthil in branch 'default':
Fix issue11283 - Clarifying a re pattern in the re module docs for conditional
regex
http://hg.python.org/cpython/rev/06cca90ff105
--
nosy: +python-dev
Roundup Robot devnull@devnull added the comment:
New changeset d676601fee6f by Senthil Kumaran in branch '3.1':
Fix issue11283 - Clarifying a re pattern in the re module docs for conditional
regex
http://hg.python.org/cpython/rev/d676601fee6f
Senthil Kumaran orsent...@gmail.com added the comment:
Okay, fixed in all relevant branches.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Senthil Kumaran orsent...@gmail.com added the comment:
Thinking about the regex pattern again. The example given is not really wrong.
It does what it claims to match, that is 'u...@example.com' and
'u...@example.com' and reject u...@example.com' kind of string. Nothing is
said about 'u
On Tue, Feb 22, 2011 at 08:48:20AM +, wesley chun wrote:
The fix is to add the end char '$' to the regex to get all 4 working:
Better would be a regex for white-space '\s' which would achieve the
same purpose plus it would satisfy the other requirement for using it
with search and can do
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: +pitrou
stage: - patch review
versions: -Python 2.5, Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11283
___
wesley chun wes...@gmail.com added the comment:
i wanted to add one additional comment that it would be nice to have a
regex that works with search() (in addition to match()) because such
an email address may appear in the middle of a line, say a From: or
To: email header.
the fix of using a
On Feb 23, 9:11 pm, monkeys paw mon...@joemoney.net wrote:
if I have a string such as 'td01/12/2011/td' and i want
to reformat it as '20110112', how do i pull out the components
of the string and reformat them into a DDMM format?
I have:
import re
test = re.compile('\d\d\/')
f =
On Feb 24, 2:11 am, monkeys paw mon...@joemoney.net wrote:
if I have a string such as 'td01/12/2011/td' and i want
to reformat it as '20110112', how do i pull out the components
of the string and reformat them into a DDMM format?
I have:
import re
test = re.compile('\d\d\/')
f =
if I have a string such as 'td01/12/2011/td' and i want
to reformat it as '20110112', how do i pull out the components
of the string and reformat them into a DDMM format?
I have:
import re
test = re.compile('\d\d\/')
f = open('test.html') # This file contains the html dates
for line in
In article kaidnysdesvyi_jqnz2dnuvz_qgdn...@insightbb.com,
monkeys paw mon...@joemoney.net wrote:
if I have a string such as 'td01/12/2011/td' and i want
to reformat it as '20110112', how do i pull out the components
of the string and reformat them into a DDMM format?
I have:
import
On Wed, 23 Feb 2011 21:11:53 -0500, monkeys paw wrote:
if I have a string such as 'td01/12/2011/td' and i want to reformat
it as '20110112', how do i pull out the components of the string and
reformat them into a DDMM format?
data = 'td01/12/2011/td'
# Throw away tags.
data = data[4:-5]
#
On Wed, Feb 23, 2011 at 6:37 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
On Wed, 23 Feb 2011 21:11:53 -0500, monkeys paw wrote:
if I have a string such as 'td01/12/2011/td' and i want to reformat
it as '20110112', how do i pull out the components of the string and
reformat
statement, however. If you're
trying to parse HTML, use an HTML parser. Using a regex like this is
perfectly fine for parsing the CDATA text inside the HTML td element,
but pattern matching the HTML markup itself is madness.
--
http://mail.python.org/mailman/listinfo/python-list
if I have a string such as 'td01/12/2011/td' and i want
to reformat it as '20110112', how do i pull out the components
of the string and reformat them into a DDMM format?
I have:
import re
test = re.compile('dd/')
f = open('test.html') # This file contains the html dates
for line in f:
New submission from wesley chun wes...@gmail.com:
In the re docs, it states the following for the conditional regular expression
syntax:
(?(id/name)yes-pattern|no-pattern)
Will try to match with yes-pattern if the group with given id or name exists,
and with no-pattern if it doesn’t
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11283
___
___
New submission from Martin von Gagern martin.vgag...@gmx.net:
If I follow the documentation at
http://docs.python.org/library/unittest.html#unittest.main by putting the
following two snippets of code in my module file:
def load_tests(loader, standard_tests, pattern='test*.py'):
# top
Hi People,
I need some ideas on how to find pattern in random data series like stock
chart.
What I want is to be able to find Head Shoulder pattern in chart.
Thanx
Anil
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Dec 15, 2010 at 9:21 PM, jupiter anil.jupit...@gmail.com wrote:
Hi People,
I need some ideas on how to find pattern in random data series like stock
chart.
What I want is to be able to find Head Shoulder pattern in chart.
Have a look at the references in:
http://www.dpem.tuc.gr
On Wed, Dec 15, 2010 at 6:22 PM, Katie T ka...@coderstack.co.uk wrote:
On Wed, Dec 15, 2010 at 9:21 PM, jupiter anil.jupit...@gmail.com wrote:
Hi People,
I need some ideas on how to find pattern in random data series like stock
chart.
What I want is to be able to find Head Shoulder
On Thu, Dec 16, 2010 at 2:34 AM, Chris Rebert c...@rebertia.com wrote:
On Wed, Dec 15, 2010 at 6:22 PM, Katie T ka...@coderstack.co.uk wrote:
On Wed, Dec 15, 2010 at 9:21 PM, jupiter anil.jupit...@gmail.com wrote:
Hi People,
I need some ideas on how to find pattern in random data series like
of implementing
this. Mono isn't that different right?
In this design pattern, you have something like a dry cleaner's,
where people submit jobs at the counter, and go away right
away with a ticket (Python returns -- but keeps running). When
they come back is more up to them. Work has been done
the Python interpreter, which lives
as its own process. The VMs have various ways of implementing
this. Mono isn't that different right?
In this design pattern, you have something like a dry cleaner's,
where people submit jobs at the counter, and go away right
away with a ticket (Python
On Tue, Dec 14, 2010 at 8:10 PM, Kushal Kumaran
kushal.kumaran+pyt...@gmail.com wrote:
snip
In this design pattern, you have something like a dry cleaner's,
where people submit jobs at the counter, and go away right
away with a ticket (Python returns -- but keeps running). When
they come
If you are implementing a COM object using win32com, then Python will
never be unloaded from the host process, which works in your favour.
Just have the COM object use a thread and a queue for this processing.
The 'report' method would just stick the params and filenames in the
queue and
Greetings gurus.
I'm faced with the challenge of having a single-threaded proprietary
Win32
language wanting to do multiple calls against a Python COM object.
Something like...
loObj = CREATEOBJECT(map_maker)
loObj.report( params, filename)
do while .True.
yadda yadda
enddo
RETURN
I.e. the
On 01/12/2010 07:07, Ramprakash Jelari thinakaran wrote:
Hi all,
Would like to search list of directories with specific pattern and
delete it?.. How can i do it?.
Example: in /home/jpr/ i have the following list of directories.
1.2.3-2, 1.2.3-10, 1.2.3-8, i would like to delete the directories
Hi all,
Would like to search list of directories with specific pattern and delete
it?.. How can i do it?.
Example: in /home/jpr/ i have the following list of directories.
1.2.3-2, 1.2.3-10, 1.2.3-8, i would like to delete the directories other
than 1.2.3-10 which is the higher value?..
Regards
Antoine Pitrou pit...@free.fr added the comment:
That's a fine addition, I've committed it in r86177.
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
New submission from Julien ÉLIE jul...@trigofacile.com:
NNTP.list(*, file=None)
Couldn't a grouppattern argument be added?
LIST ACTIVE handles a newsgroup pattern (and it would then answer
less groups -- also useful for the test suite of nntplib)
Something like that:
--- nntplib.py.OLD
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10283
___
___
Python-bugs-list
So, I have a rather tricky string comparison problem: I want to search
for a set pattern in a variable source.
To give you the context, I am searching for set primer sequences
within a variable gene sequence. In addition to the non-degenerate A/G/
C/T, the gene sequence could have degenerate
On 05/10/2010 20:03, chaoticcran...@gmail.com wrote:
So, I have a rather tricky string comparison problem: I want to search
for a set pattern in a variable source.
To give you the context, I am searching for set primer sequences
within a variable gene sequence. In addition to the non-degenerate
On Oct 5, 3:38 pm, MRAB pyt...@mrabarnett.plus.com wrote:
On 05/10/2010 20:03, chaoticcran...@gmail.com wrote:
So, I have a rather tricky string comparison problem: I want to search
for a set pattern in a variable source.
To give you the context, I am searching for set primer sequences
On 10/05/10 15:06, chaoticcran...@gmail.com wrote:
On Oct 5, 3:38 pm, MRABpyt...@mrabarnett.plus.com wrote:
On 05/10/2010 20:03, chaoticcran...@gmail.com wrote:
So, I have a rather tricky string comparison problem: I want to search
for a set pattern in a variable source.
To give you
On 05/10/2010 21:06, chaoticcran...@gmail.com wrote:
On Oct 5, 3:38 pm, MRABpyt...@mrabarnett.plus.com wrote:
On 05/10/2010 20:03, chaoticcran...@gmail.com wrote:
So, I have a rather tricky string comparison problem: I want to search
for a set pattern in a variable source.
To give you
[snip]
Additional: I forgot to mention that you should understand the
difference between the .match() and .search() mthods. .match() is
anchored to the starting position, so you'll want to use .search()
instead.
--
http://mail.python.org/mailman/listinfo/python-list
chaoticcran...@gmail.com chaoticcran...@gmail.com writes:
So, I have a rather tricky string comparison problem: I want to search
for a set pattern in a variable source.
To give you the context, I am searching for set primer sequences
within a variable gene sequence. In addition to the non
Ah, very good, it's working perfectly now. Thank you so much for your
help - regular expressions are very powerful!
On Oct 5, 4:26 pm, MRAB pyt...@mrabarnett.plus.com wrote:
[snip]
Additional: I forgot to mention that you should understand the
difference between the .match() and .search()
Hi all,
I remember perl has a match function =~/H/ -- which searches if there
is H pattern in line. Is there a reasonable analog of it in python?
thanks!
Alex
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Sep 20, 2010 at 12:58 PM, rudikk00 rudik...@yahoo.com wrote:
Hi all,
I remember perl has a match function =~/H/ -- which searches if there
is H pattern in line. Is there a reasonable analog of it in python?
Yes, have a look at the re module in the standard library.
If all you're
rudikk00 rudik...@yahoo.com writes:
I remember perl has a match function =~/H/ -- which searches if there
is H pattern in line. Is there a reasonable analog of it in python?
It's called a regular expression, which can be matched or searched in a
string. Take a look at the module re in python
Mark Lawrence breamore...@yahoo.co.uk added the comment:
Well what is the decision? FWIW I sway towards the +0 from msg112156 rather
than the -0 from msg63791, but then what do I know?
--
nosy: +BreamoreBoy
___
Python tracker rep...@bugs.python.org
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
Removed message: http://bugs.python.org/msg63791
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1686
___
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This looks fine.
--
assignee: barry -
resolution: - accepted
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1686
___
Florent Xicluna florent.xicl...@gmail.com added the comment:
Committed with r84888.
--
assignee: - flox
resolution: accepted - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
the pattern bookId
20, noofBooks 6576, authorId 41, publishingCompanyId 7 but I don't
know how search one based on another.
Using a regular expression I would perform a match against each line.
If the match fails, it will return None. If the match succeeds it
returns a match object with which you
to first search for AddNewBookD
if found
store bookId, noofBooks, authorId and publishingCompanyId
I know how to search for only AddNewBookD or find the pattern bookId
20, noofBooks 6576, authorId 41, publishingCompanyId 7 but I don't
know how search one based on another.
--
http://mail.python.org
, noofBooks 6577, authorId 42,
publishingCompanyId 8}
I want to first search for AddNewBookD
if found
store bookId, noofBooks, authorId and publishingCompanyId
I know how to search for only AddNewBookD or find the pattern bookId
20, noofBooks 6576, authorId 41, publishingCompanyId 7 but I
Florent Xicluna florent.xicl...@gmail.com added the comment:
The patch (braced_override.diff) still applies on 3.2.
I am +0, because it is small and tested.
What is the decision?
--
nosy: +flox
stage: - patch review
versions: +Python 3.2 -Python 3.0
Georg Brandl ge...@python.org added the comment:
Added in r83236.
--
nosy: +georg.brandl
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6630
___
On 22 Jul., 22:25, Ian hobso...@gmaiil.com wrote:
Hi Karsten,
On 22/07/2010 12:03, Karsten Wutzke wrote: What is it I'm missing?
I think you are making it more complicated than it really is.
The visitor pattern is about bringing all the little bits that would
otherwise be scattered all
and
code generation, but then the use of the visitor pattern becomes more
and more questionable.
What is it I'm missing?
Karsten
--
http://mail.python.org/mailman/listinfo/python-list
# public final
modifierString =
i = 0
for modifier in method.getModifiers():
if i 0:
modifierString +=
modifierString += modifier
i += 1
And please don't comment on the code itself, as I'm just
Hi Karsten,
On 22/07/2010 12:03, Karsten Wutzke wrote:
What is it I'm missing?
I think you are making it more complicated than it really is.
The visitor pattern is about bringing all the little bits that would
otherwise be scattered all over
many node classes into one visitor class
use
then? I'm rather tempted to ditch the idea of separating iteration and
code generation, but then the use of the visitor pattern becomes more
and more questionable.
What is it I'm missing?
Karsten
I suggest you google for python patterns alex martelli. From what I've
read, he's forgotten
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 dispatch VP
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
of the motivating examples for
the introduction of generators in Python was their use in flattening
data structure, i.e. exactly the pattern used by os.walk.
The Visitor Pattern isn't about traversing, so they could as well have
had an os.walk() that took a visitor object. Instead, it's about
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
On Jul 15, 7:58 pm, Karsten Wutzke kwut...@web.de 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
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
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
--
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 strictly and strongly. Nice
Greetings,
I have some code that I wrote and know there is a better way to
write it. I wonder if anyone could point me in the right direction
on making this 'cleaner'.
I have two lists: liveHostList = [ app11, app12, web11, web12, host11 ]
Chad Kellerman wrote:
Greetings,
I have some code that I wrote and know there is a better way to
write it. I wonder if anyone could point me in the right direction
on making this 'cleaner'.
I have two lists: liveHostList = [ app11, app12, web11, web12, host11 ]
On 07/16/2010 02:20 PM, Chad Kellerman wrote:
Greetings,
I have some code that I wrote and know there is a better way to
write it. I wonder if anyone could point me in the right direction
on making this 'cleaner'.
I have two lists: liveHostList = [ app11, app12, web11, web12,
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
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, what
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
se. So is the double-dispatch Visitor
pattern,
Yes, typo, I meant strictly.
Wait, what?
First of all, python is strictly typed in that every object has exactly
one type, which is different from other types. So you can't do 1+2, as
you can in some other languages.
Anyway
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
strictly.
single-dispatch isn't available per se. So is the double-dispatch Visitor
pattern,
Yes, typo, I meant strictly.
Wait, what?
First of all, python is strictly typed in that every object has exactly
one type, which is different from other types. So you can't do 1+2, as
you can in some
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
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
--
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
801 - 900 of 1396 matches
Mail list logo