You mean 'get' method should not alter the dict, does 'dict[key]' should not
alter the dict either?
d = defaultdict(set)
assert len(d) == 0
print d[1]
assert len(d) == 1
auto insert value to dict, when value is not in dict, is what defaultdict
try to do.
On Fri, May 22, 2009 at 7:46 AM, Rhodri J
On May 21, 8:27 pm, MRAB wrote:
> byron wrote:
>
> [snip]
>
> > Thanks. Yes i tried something like this, but I think I overwrite `c`
> > when i wrote it, as in:
>
> > if len(c) > 0:
> > c = fin_node(c, name)
> > if c is not None:
> > return c
>
> FYI, doing that won
In article <04eacd56-5293-4553-bdb3-ad2e8266c...@z7g2000vbh.googlegroups.com>,
Scooter wrote:
>
>#!/usr/bin/python
>
>import urllib
>
>u = urllib.urlopen('https://myinternal.server/pdfs/pdfstreamer.aspx')
>print 'Content-type: application/pdf\n\n'
># print 'Content-type: application/x-msdownload;
Gary Herron wrote:
> MRAB wrote:
> > Grant Edwards wrote:
> >> On 2009-05-21, Christian Heimes wrote:
> >>> seanm...@gmail.com schrieb:
> The explaination in my introductory Python book is not very
> satisfying, and I am hoping someone can explain the following to me:
>
> >>> 4
Red Forks wrote:
You mean 'get' method should not alter the dict, does 'dict[key]' should
not alter the dict either?
d = defaultdict(set)
assert len(d) == 0
print d[1]
assert len(d) == 1
auto insert value to dict, when value is not in dict, is what
defaultdict try to do.
That's the behavio
On Wed, 20 May 2009 17:08:08 +0100, walterbyrd
wrote:
I am processing a huge spreadsheet which I have converted to a csv
format. Each row will be a wiki page with several sub-headings. The
spreadsheet contains information about servers. Wiki sub-headings may
include: 'hardware', 'software', '
R. David Murray wrote:
Gary Herron wrote:
MRAB wrote:
Grant Edwards wrote:
On 2009-05-21, Christian Heimes wrote:
seanm...@gmail.com schrieb:
The explaination in my introductory Python book is not very
satisfying, and I am hoping someone can explain the f
On May 21, 5:45 pm, norseman wrote:
> seanm...@gmail.com wrote:
> > The explaination in my introductory Python book is not very
> > satisfying, and I am hoping someone can explain the following to me:
>
> 4 / 5.0
> > 0.80004
>
> > 4 / 5.0 is 0.8. No more, no less. So what's up wit
On May 21, 5:36 pm, Chris Rebert wrote:
> On Thu, May 21, 2009 at 2:53 PM, Carl Banks wrote:
> > On May 21, 2:05 pm, seanm...@gmail.com wrote:
> >> The explaination in my introductory Python book is not very
> >> satisfying, and I am hoping someone can explain the following to me:
>
> >> >>> 4 /
Rob Clewley wrote:
On Thu, May 21, 2009 at 8:19 PM, Gary Herron wrote:
MRAB wrote:
Grant Edwards wrote:
On 2009-05-21, Christian Heimes wrote:
seanm...@gmail.com schrieb:
The explaination in my introductory Python book is not very
satisfying, and I am hop
On Thu, 21 May 2009 08:55:45 +0100, yadin wrote:
this is the program...I wrote but is not working
I have a list of valves, and another of pressures;
If I am ask to find out which ones are the valves that are using all
this set of pressures, wanted best pressures
this is the program i wrote but
I guess I am confused about when when escape characters are are
interpersonal as escape characters, and escape characters are not
treated as escape characters.
Sometimes escape characters in regular strings are treated as escape
characters, sometimes not. Same seems to go for raw strings. So how d
Gosh, you guys are slow. :-) I figured it out.
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 22 May 2009 03:42:18 +0100, walterbyrd
wrote:
I guess I am confused about when when escape characters are are
interpersonal as escape characters, and escape characters are not
treated as escape characters.
No, you're confused about the number of entirely different things
that are in
On Wed, 20 May 2009 09:19:50 +0100,
wrote:
On 20 May, 03:43, Steven D'Aprano
wrote:
On Tue, 19 May 2009 03:57:43 -0700, jeremy wrote:
> As I wrote before, concurrency is one of the hardest things for
> professional programmers to grasp. For 'amateur' programmers we need
to
> make it as s
Please don't top-post, it makes the thread of argument hard to follow.
On Fri, 22 May 2009 01:44:37 +0100, Red Forks wrote:
You mean 'get' method should not alter the dict, does 'dict[key]' should
not
alter the dict either?
d = defaultdict(set)
assert len(d) == 0
print d[1]
assert len(d) ==
On May 21, 5:55 pm, shailesh wrote:
> There doesn't seem to be a predicate returning method wrappers. Is
> there an alternate way to query an object for attributes that are of
> method wrappers?
Sure:
>>> MethodWrapper = type({}.__init__)
>>> isinstance([].__len__, MethodWrapper)
True
But you'r
Imbaud Pierre wrote:
>
>I have A LOT of batch applications to monitor, on linux machines, mostly
>written in python.
>I have to know:
>- which are active, at a given moment?
>- when did the last run occur? How long did it last?
>- for some daemons: are they stuck? generally, waiting for i/o, or l
Dave Angel wrote:
>
>Anyway, now you can see two batch files you could use to make a
>particular version of Python active. The first one uses assoc and ftype
>to fix the asssociations. And the other changes the environment variable
>PATHEXT to make the extension optional. Note that changing t
On Thu, May 21, 2009 at 11:05 PM, wrote:
> The explaination in my introductory Python book is not very
> satisfying, and I am hoping someone can explain the following to me:
>
4 / 5.0
> 0.80004
>
> 4 / 5.0 is 0.8. No more, no less. So what's up with that 4 at the end.
> It bother
Here is the next problem. For boolean/logical fields, I can set their
value to True/False easily. However, setting NULL seems impossible:
rec = tbl.newRecord()
rec["SOMEFIELD1"] = True # Works fine
rec["SOMEFIELD2"] = False # Works fine
rec["SOMEFIELD3"] = None # Will store False
rec["SOMEFIELD
On Fri, 22 May 2009 08:34:17 +0200, Laszlo Nagy
wrote:
> Now I also tried to set -1. In any of the above cases, if I open that
> dbf file with a commercial DBF editor application then I see that the
> value is not null.
>
> - Borland Database Desktop shows "False" value
> - CDBF shows an invali
101 - 122 of 122 matches
Mail list logo