Steven D'Aprano wrote:
> And for guru-level mastery, replace to call to dict.__init__ with ...
nothing at all, because dict.__init__ doesn't do anything.
>
>
>
(Sorry, should have sent to list).
I don't understand this - it must do something:
class MyDict1(dict):
def __init__(self, *args,
"Marco Rompré" wrote
Oups my posting was too big!!!
In general it is better to popst long listings (over 100 lines say)
to a web site such as pastebin. That will ensure they are readable
and will not fill up peoples mailboxes unnecessarily.
However, even better is to reproduce your error in
On Wed, 28 Apr 2010 07:53:06 +0100
Walter Wefft wrote:
> Steven D'Aprano wrote:
> > And for guru-level mastery, replace to call to dict.__init__ with ...
> nothing at all, because dict.__init__ doesn't do anything.
> >
> >
> >
>
> (Sorry, should have sent to list).
>
> I don't understand t
spir ☣ wrote:
On Wed, 28 Apr 2010 07:53:06 +0100
Walter Wefft wrote:
Steven D'Aprano wrote:
> And for guru-level mastery, replace to call to dict.__init__ with ...
nothing at all, because dict.__init__ doesn't do anything.
>
>
>
(Sorry, should have sent to list).
I don't understand thi
On Wed, 28 Apr 2010 04:53:06 pm Walter Wefft wrote:
> Steven D'Aprano wrote:
> > And for guru-level mastery, replace to call to dict.__init__ with
> > ...
>
> nothing at all, because dict.__init__ doesn't do anything.
[...]
> Behaviour is different depending on whether you call the superclass
> _
While some patterns are infinite, other's aren't (e.g. The example I gave).
Using a subset of Regex syntax to produce a set of strings has the advantage of
using a well understood and documented form, and if you could hook into the
existing API, at minimal coding effort.
In addition, it allows
On 4/28/2010 3:20 AM Walter Wefft said...
spir ☣ wrote:
On Wed, 28 Apr 2010 07:53:06 +0100
Walter Wefft wrote:
===
class MyDict0(dict):
pass
class MyDict1(dict):
def __init__(self, *args, **kw):
pass
class MyDict2(dict):
def __init__(self, *args, **kw):
dict.__ini
Emile van Sebille wrote:
On 4/28/2010 3:20 AM Walter Wefft said...
spir ☣ wrote:
On Wed, 28 Apr 2010 07:53:06 +0100
Walter Wefft wrote:
===
class MyDict0(dict):
pass
class MyDict1(dict):
def __init__(self, *args, **kw):
pass
class MyDict2(dict):
def __init__(self
On 4/28/2010 9:32 AM Walter Wefft said...
Emile van Sebille wrote:
On 4/28/2010 3:20 AM Walter Wefft said...
You reiterate my point. To say that dict.__init__ can be omitted in a
subclass's __init__ with no effect, is not a correct statement.
It wasn't the omitted case that exhibits the diff
On Wednesday April 28 2010 13:04:30 Steven D'Aprano wrote:
> On Wed, 28 Apr 2010 04:53:06 pm Walter Wefft wrote:
> > Steven D'Aprano wrote:
> > > And for guru-level mastery, replace to call to dict.__init__ with
> > > ...
> >
> > nothing at all, because dict.__init__ doesn't do anything.
>
> [..
Thank you all. One tangentially related question: what does (self,
*args, **kwargs) actually mean? How does one reference variables given
to a function that accepts these inputs?
Colin
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subs
Hello, I'm a beginner programmer, trying to learn python. I'm currently
reading The programming Historian,
http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
I stumbled into lists of words and lists of characters. I have no
explications in that book for those two and I didn't found some expl
On Wed, Apr 28, 2010 at 2:06 PM, Daniel wrote:
> Hello, I'm a beginner programmer, trying to learn python. I'm currently
> reading The programming
> Historian,http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
> I stumbled into lists of words and lists of characters. I have no
> explication
On 04/29/10 01:32, m...@doctors.net.uk wrote:
> While some patterns are infinite, other's aren't (e.g. The example I gave).
How should the regex engine know about that?
> Using a subset of Regex syntax to produce a set of strings has the
> advantage of using a well understood and documented for
On Wednesday April 28 2010 20:57:27 C M Caine wrote:
> Thank you all. One tangentially related question: what does (self,
> *args, **kwargs) actually mean? How does one reference variables given
> to a function that accepts these inputs?
*args is a tuple containing the positional arguments;
**kwa
On Wed, Apr 28, 2010 at 2:27 AM, wrote:
> Is there an way of using the regex patterns to produce text, instead of
> matching it?
There have been some previous discussions about generating all of the
possible matches for a given regular expressions. I believe these are
the first messages in a c
On Thu, 29 Apr 2010 06:36:18 am Lie Ryan wrote:
> On 04/29/10 01:32, m...@doctors.net.uk wrote:
> > While some patterns are infinite, other's aren't (e.g. The example
> > I gave).
>
> How should the regex engine know about that?
The regex engine itself doesn't run in reverse, so it can't know this
I want to create a program to tell me when I am supposed to do things.
I have a text file with dates like 4-4-2010' as well as other data. I
want to read in this date into my code and then compare it with
'date.today()'
example 'if /variable/ >= today:'
I don't see how to read in a string and
"Eric Meigs" wrote
I don't see how to read in a string and get it into a format for comparison.
Have you loked at the time and datetime modules?
They should do all you need.
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
___
"Daniel" wrote
I stumbled into lists of words and lists of characters. I have no
explications in that book for those two and I didn't found some explications
on the web.
aListOfWords = ['one','word','or','many']
aListOfCharacters = ['a','s','d','f']
aStringOfCharacters = 'asdf'
aWord = aS
On Thu, 29 Apr 2010 05:06:22 am Daniel wrote:
> Hello, I'm a beginner programmer, trying to learn python. I'm
> currently reading The programming Historian,
> http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
> I stumbled into lists of words and lists of characters. I have no
> explications
On 2010-04-28, Eric Meigs wrote:
> This is a multi-part message in MIME format.
> --===0277013919==
> Content-Type: multipart/alternative;
> boundary="060806000801070600050409"
>
> This is a multi-part message in MIME format.
> --060806000801070600050409
>
22 matches
Mail list logo