Here is an old one I wrote. Good for small collections of documents and
uncomplicated queries.
https://github.com/jackdied/boolmatch
-Jack
On Thu, Apr 23, 2015 at 10:50 AM, subhabrata.bane...@gmail.com wrote:
Dear Group,
I want to do the Boolean search over various sentences or documents.
On Tue, Mar 27, 2012 at 12:24 AM, Ben Finney ben+pyt...@benfinney.id.au wrote:
Roy Smith r...@panix.com writes:
In article 878vimhfdp@benfinney.id.au,
Ben Finney ben+pyt...@benfinney.id.au wrote:
So, if I want to be free to choose an identity provider I trust, and
it's not Facebook or
Jack Diederich jackd...@gmail.com added the comment:
Either someone changed the test or I can't understand how the try/except/else
could happen where 'conn' is undefined in the else. Either way, I'm marking it
closed.
--
resolution: - out of date
status: open - closed
just google jack diederich decorators it costs nothing and you get a
free pycon talk out of it.
-Jack
--
http://mail.python.org/mailman/listinfo/python-list
I don't have any great advice, that kind of issue is hard to pin down.
That said, do try using a python compile with --with-debug enabled,
with that you can turn your unit tests on and off to pinpoint where
the refcounts are getting messed up. It also causes python to use
plain malloc()s so
On Thu, Oct 6, 2011 at 12:15 PM, Jeff Gaynor jgay...@ncsa.illinois.edu wrote:
On 10/06/2011 08:34 AM, Kayode Odeyemi wrote:
I'm working on a pretty large application that I will like to use oauth2
on as an authentication and authorization mechanism.
There are *no* usable OAuth version 2..0
On Tue, Aug 2, 2011 at 10:15 PM, Steven D'Aprano
steve+comp.lang.pyt...@pearwood.info wrote:
I'm not greatly experienced with context managers and the with statement, so
I would like to check my logic.
Somebody (doesn't matter who, or where) stated that they frequently use this
idiom:
spam
On Sat, Jun 4, 2011 at 9:43 PM, Gregory Ewing
greg.ew...@canterbury.ac.nz wrote:
Steven D'Aprano wrote:
A nice piece of syntax that has been proposed for Python is yield from,
which will do the same thing, but you can't use that yet.
You can also patch the library to always return lists
Changes by Jack Diederich jackd...@gmail.com:
--
nosy: +jackdied
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11812
___
___
Python-bugs-list
On Mon, Feb 28, 2011 at 10:54 AM, Robi roberto.inzeri...@gmail.com wrote:
Hi everybody,
I'm totally new to Python but well motivated :-)
I'm fooling around with Python in order to interface with FlightGear
using a telnet connection.
I can do what I had in mind (send some commands and read
On Mon, Feb 28, 2011 at 11:50 AM, Robi roberto.inzeri...@gmail.com wrote:
Telnet sends two kinds of data over the same channel (a simple TCP
stream). It sends the bytes you actually see in your terminal and it
sends control commands that do things like turn echo on/off and
negotiate what
On Mon, Feb 28, 2011 at 12:13 PM, Roberto Inzerillo
roberto.inzeri...@gmail.com wrote:
Yes. read_eager() will never actually read from the socket, if it has
any data it has already read processed it will return those. If you
call it enough times it will just start returning empty strings
On Fri, Jan 28, 2011 at 1:32 PM, Raymond Hettinger pyt...@rcn.com wrote:
I hoping a new trend will start with dev's putting direct
source code links in their documentation:
http://rhettinger.wordpress.com/2011/01/28/open-your-source-more/
I'm looking for more examples of projects that
Changes by Jack Diederich jackd...@gmail.com:
--
assignee: - jackdied
nosy: +jackdied
versions: +Python 3.2 -Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10245
Jack Diederich jackd...@gmail.com added the comment:
There was no test suite for telnetlib prior to 2.7/3.1 so it is easily possible
that this is a regression. If you can post a test case that fails or - even
better - a patch that passes where the current code fails I'd be very
appreciative
Jack Diederich jackd...@gmail.com added the comment:
Thanks David, do you want to apply? Looks good to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7761
On Thu, Oct 7, 2010 at 7:56 AM, Diez B. Roggisch de...@web.de wrote:
Chris Withers ch...@simplistix.co.uk writes:
Is it just me or does the mailing of just about every single
python-based project mailing list with a 90% form email advertising a
conference that only has one python track *and*
On Thu, Oct 7, 2010 at 11:55 AM, Capstick, Antony H
antony.h.capst...@disney.com wrote:
I am looking for an experienced Person .. to develop and implement a
graphical track map operating in MS
Windows that will be used to display graphical information for a new Disney
attraction.
1)
Changes by Jack Diederich jackd...@gmail.com:
--
nosy: +jackdied
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1673007
___
___
Python-bugs-list
Jack Diederich jackd...@gmail.com added the comment:
This is a change in the codepath for instances that don't have __class__
defined.
subclass = getattr(instance, '__class__', None)
-if subclass in cls._abc_cache:
+if subclass is not None and subclass in cls._abc_cache
Jack Diederich jackd...@gmail.com added the comment:
Mike, it is better to think of database rows as immutable tuples. During the
course of a query the contents of the database are considered static - hence
all that locking and kvetching about this or that database not having true
foreign
Jack Diederich jackd...@gmail.com added the comment:
r76133 (which came after this bug) fixed most test_telnetlib bugs by using
mocks instead of trying to setup full-blown client/server TCP cases.
--
___
Python tracker rep...@bugs.python.org
http
Jack Diederich jackd...@gmail.com added the comment:
Can you check this on 3.1.2 or 3.2? There were a few bugfixes of the bytes
handling in that timeframe.
--
assignee: - jackdied
nosy: +jackdied
priority: high - normal
___
Python tracker rep
Jack Diederich jackd...@gmail.com added the comment:
I like it, but I think it would help to give it the same interface as
contextlib.contextmanager (the single function, single yield). Like your mock
library 'patch' both function decorators and context managers have an interface
that reads
Jack Diederich jackd...@gmail.com added the comment:
Hey Frood, I'll take another look at it tomorrow when I am less addled. But
as to context managers that are actual classes - I've not written a single one;
they are always generator functions with a simple try/yield/except/finally
Jack Diederich jackd...@gmail.com added the comment:
Raymond,
Short version: This isn't theoretical because I use context managers and
function decorators interchangeably and constantly.
Long Version: Function decorators and context managers have very similar use
cases. They both go
On Thu, Jul 8, 2010 at 10:02 PM, MRAB pyt...@mrabarnett.plus.com wrote:
sturlamolden wrote:
It seems y is not x fits well with spoken English, but it is also a
bit surprising that y is not x does not mean y is (not x) but not
(y is x). Why does Python reorder is and not operators, and what are
New submission from Jack Diederich jackd...@gmail.com:
ython 2.7b2+ (trunk:81337, May 19 2010, 12:16:22)
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
class X(object):
... @property
... def foo(self): pass
...
help(X.foo.fset)
Welcome to Python 2.7
On Thu, Jun 17, 2010 at 12:58 PM, Stephen Hansen
me+list/pyt...@ixokai.io wrote:
On 6/17/10 10:01 AM, Ethan Furman wrote:
Stephen Hansen wrote:
On 6/17/10 9:12 AM, pyt...@bdurham.com wrote:
Now, this is all IMHO: the style guide does not define any 'guidelines'
on this, except that its okay
On Sat, Jun 12, 2010 at 11:09 PM, rantingrick rantingr...@gmail.com wrote:
-
Where is the community?
-
[snip]
You people need to get a life, drop your narcissistic attitudes and be
more helpful, friendly, and welcoming to the wider world.
On Tue, Jun 8, 2010 at 6:47 PM, Mark Young marky1...@gmail.com wrote:
According to the Oxford Dictionary:
fish noun, verb noun (pl.fish or fishes)Fish is the usual plural form. The
older form, fishes, can be used to refer to different kinds of fish...
However, I would correct anyone that
Changes by Jack Diederich jackd...@gmail.com:
--
nosy: +jackdied
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8847
___
___
Python-bugs-list
Jack Diederich jackd...@gmail.com added the comment:
I can't reproduce on 3k trunk with Ubuntu 10.04, gcc 4.4.3
namedtuples are just a subclass of tuple with only two dunder methods defined
(a plain __new__ with empty __slots__). Can you provoke the same behavior with
plain tuples
Jack Diederich jackd...@gmail.com added the comment:
Two more probes:
1) does it also have the same strange/crashy behavior when you subclass list
and concat that to a tuple?
2) does dropping the optimization level down to -O help? This has compiler
quirk written all over it. The C-code
Jack Diederich jackd...@gmail.com added the comment:
if the id() of the left operand is identical to the id() of the first element
in the result it would strongly support compiler skulldugerry.
class Crasher(tuple): pass
foo = Crasher()
x = [1]
a = x + foo
b=a[0]
if id(b) == id(x):
raise
On Thu, May 20, 2010 at 8:13 PM, Stef Mientki stef.mien...@gmail.com wrote:
hello,
This might be a strange question, but as a practical guy, I'm not searching
for the best solution, but for a practical solution.
I've a class which I've used very extensively.
Now I want to extend that class
New submission from Jack Diederich jackd...@gmail.com:
I tried logging into the tracker using my gmail login and accidentally
created a new user. Could someone either wipe out the OpenID for
jackd...@gmail.com (but NOT the jackdied login with email addy of
jackd...@gmail.com) or combine the two
Changes by Jack Diederich jackd...@gmail.com:
--
assignee: d...@python - jackdied
nosy: +jackdied
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8707
Jack Diederich jackd...@gmail.com added the comment:
Woops, didn't know that email would create a new bug.
--
nosy: +jackdied
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8708
On Tue, Apr 6, 2010 at 2:11 PM, Gustavo Narea m...@gustavonarea.net wrote:
Hello!
Could you please confirm whether my understanding of equality
operations in sets and lists is correct? This is how I think things
work, partially based on experimentation and the online documentation
for
On Fri, Mar 26, 2010 at 10:49 AM, kj no.em...@please.post wrote:
What's the word on using classes as namespaces? E.g.
class _cfg(object):
spam = 1
jambon = 3
huevos = 2
breakfast = (_cfg.spam, _cfg.jambon, _cfg.huevos)
Classes as namespaces are a valid use case (I do it all
On Tue, Mar 16, 2010 at 2:18 AM, Chris Rebert c...@rebertia.com wrote:
On Mon, Mar 15, 2010 at 11:01 PM, Josh English
joshua.r.engl...@gmail.com wrote:
I have a large program with lots of data stored in XML. I'm upgrading
my GUI to use ObjectListView, but with my data in XML, I don't have
On Sat, Mar 13, 2010 at 11:19 AM, Jon Clements jon...@googlemail.com wrote:
This is semi-experimental and I'd appreciate opinions of whether it's
the correct design approach or not. It seems like a good idea, but it
doesn't mean it is.
I have a class 'A', this provides standard support
On Sat, Mar 13, 2010 at 12:03 PM, JLundell jlund...@pobox.com wrote:
I've got a subclass of fractions.Fraction called Value; it's a mostly
trivial class, except that it overrides __eq__ to mean 'nearly equal'.
However, since Fraction's operations result in a Fraction, not a
Value, I end up
On Sat, Mar 13, 2010 at 12:10 PM, Jon Clements jon...@googlemail.com wrote:
On 13 Mar, 16:42, Jack Diederich jackd...@gmail.com wrote:
On Sat, Mar 13, 2010 at 11:19 AM, Jon Clements jon...@googlemail.com wrote:
This is semi-experimental and I'd appreciate opinions of whether it's
the correct
On Fri, Mar 5, 2010 at 2:54 PM, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
On Fri, 05 Mar 2010 15:01:23 -0400, Rolando Espinoza La Fuente wrote:
On Fri, Mar 5, 2010 at 2:32 PM, mk mrk...@gmail.com wrote:
Arnaud Delobelle wrote:
1 == True
True
0 == False
True
So
On Fri, Mar 5, 2010 at 6:09 PM, Steven D'Aprano
st...@remove-this-cybersource.com.au wrote:
On Fri, 05 Mar 2010 15:58:01 -0500, Jack Diederich wrote:
So, the pythonic way to check for True/False should be:
1 is True
False
Why do you need to check for True/False?
You should never check
On Wed, Mar 3, 2010 at 12:36 PM, Xah Lee xah...@gmail.com wrote:
[snip]
Xah Lee is a longstanding usenet troll. Don't feed the trolls.
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Mar 3, 2010 at 5:18 PM, Jonathan Gardner
jgard...@jonathangardner.net wrote:
On Wed, Mar 3, 2010 at 1:11 PM, mk mrk...@gmail.com wrote:
Or I could make my life simpler and use global variable. :-)
Ding ding ding!
90% of Design Patterns is making Java suck less.
Other languages
On Wed, Feb 24, 2010 at 4:54 PM, Jonathan Gardner
jgard...@jonathangardner.net wrote:
On Wed, Feb 24, 2010 at 12:23 PM, Andreas Waldenburger
use...@geekmail.invalid wrote:
Now my question is this: How do I kill these people without the
authorities thinking they didn't deserve it?
kill -9
Jack Diederich jackd...@gmail.com added the comment:
how about an equivalent path instead of equal path? The result of
ntpath.join(ntpath.split(path)) should point to the same location even if it
isn't literally the same string.
--
nosy: +jackdied
Jack Diederich jackd...@gmail.com added the comment:
+1, the C patch looks good to me. The test file needs a new test that checks
the 'with' behavior. Also, what changed so that the test now needs to ignore
AttributeErrors in play_sound_file()?
--
nosy: +jackdied
Jack Diederich jackd...@gmail.com added the comment:
We talked about it at sprints and the semantics are ambiguous and there are
alternatives.
Ambiguous:
def show_funcs(*args): print(args)
class A():
run = partial(1)
ob = A()
ob.run(2,3)
Should this print (self, 1, 2, 3) or (1
Jack Diederich jackd...@gmail.com added the comment:
correction:
run = partial(1)
should have been
run = partial(show_funcs, 1)
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4331
Jack Diederich jackd...@gmail.com added the comment:
I've been digging into the patch. Is there a reason sendmsg() wants an
iterable of buffers instead of just accepting a str? The list-of-buffers more
closely matches the underlying syscall but I'm not sure what the python benefit
Jack Diederich jackd...@gmail.com added the comment:
one of the other sprinters just pointed out that Modules/_multiprocessing.c
(py3k branch) uses sendmsg/recvmsg internally to pass file descriptors back and
forth. The code is very short and readable
Jack Diederich jackd...@gmail.com added the comment:
I'm having some trouble wrapping my head around this one. It isn't obvious to
me that
my_method(*args):
print(args)
class A():
meth = partial(my_method, 'argA')
ob = A()
ob.meth('argB')
should print (A object at 0x1234, 'argA', 'argB
Jack Diederich jackd...@gmail.com added the comment:
-1, my Ubuntu laptop says linux2 and not ubuntu. This would also be an
incompatible change that would cause headaches with little benefit to balance
it out.
--
nosy: +jackdied
___
Python tracker
Jack Diederich jackd...@gmail.com added the comment:
I was mistaken, the tests were backported to 3.1.x maint (In fact I was the one
who did it). So this is fixed in the next point release of 3.1.x.
--
resolution: - out of date
status: open - closed
Jack Diederich jackd...@gmail.com added the comment:
changing the definition to (const char *) seems like the right thing to do - a
quick grep of the Python source and a search on google codesearch only shows
uses with either string literals or string literals cast to (char *) in order
Jack Diederich jackd...@gmail.com added the comment:
This is true but /any/ key in the WeakValueDictionary could be reused and
result in similar behavior, not just the id() of the inserted value. I'm
closing at won't fix
--
nosy: +jackdied
resolution: - wont fix
status: open
Jack Diederich jackd...@gmail.com added the comment:
I suggest this be closed WONTFIX. The str.split() documentation accurately
describes str.split() but doesn't happen to do what the OP wanted which was
list(filter(None, '00010001'.split('0')))
Instead split(sep) is the reciprocal
Jack Diederich jackd...@gmail.com added the comment:
+0 I'm ambivalent. The script uses a reasonable default and pyhton3 is a
reasonable default for the 3k branch. That said most people will have to edit
the file anyway to use it: I had to chmod a+x the file and change the bang path
to /usr
Jack Diederich jackd...@gmail.com added the comment:
Here is a profile run of the 200 line case, run on the 3.x trunk, and with all
the trivial functions removed. quick_ratio and __contains__ dominate the time.
The process was CPU bound, memory usage stayed low.
17083154 function calls
On Fri, Feb 5, 2010 at 11:31 AM, Gerald Britton
gerald.brit...@gmail.com wrote:
I think it's because when you do ['a'].extend([]) or whatever, the
result is whatever the method extend returns. But extend has no
return value, hence you will see None if you do this interactively.
That sums it
On Sat, Jan 9, 2010 at 2:53 PM, Jan Kaliszewski z...@chopin.edu.pl wrote:
Hello,
I have a question: are class decorator planned to be backported from 3.x?
Eh? Class decorators have been in the 2.x series since 2.6.
If you want to know more about class decorators check out this talk
from PyCon
On Sat, Jan 2, 2010 at 10:38 PM, n00m n...@narod.ru wrote:
On Jan 3, 5:30 am, Steve Holden st...@holdenweb.com wrote:
Zhu Sha Zang wrote:
[stuff and nonsense from a third party]
WTF?
We do get the occasional bigot dropping in from time to time. Best to
ignore them 'til they go away.
And
Jack Diederich jackd...@gmail.com added the comment:
I tried passing a size to readline to see if increasing the chunk helps
(test file was 120meg with 700k lines). For values 1k-10k all took
around 30 seconds, with a value of 100 it took 80 seconds, with a value
of 100k it ran for several
Jack Diederich jackd...@gmail.com added the comment:
This seems to have been introduced in r72930 when the stackUnderflow()
was moved from the top of the function to the bottom. It used to test
for len 0.
Question, should cPickle and pickle be raising the same error here?
UnpicklingError
On Sat, Nov 7, 2009 at 4:39 PM, vsoler vicente.so...@gmail.com wrote:
In the accounting department I am working for we are from time to time
confronted to the following problem:
[snip]
For example, say that the customer has the following outstanding
invoices: $300, $200, $50; and say that the
Jack Diederich jackd...@gmail.com added the comment:
Antoine Pitrou: Besides, the test flow in test_telnetlib really is a
mess (setUp and tearDown getting called multiple times, for example),
could you clean it up?
Yes, I'm working on refactoring the test server and separating out
testing
Jack Diederich jackd...@gmail.com added the comment:
Looks good and works for me, please check it in.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7207
It's Xah Lee, he's been trolling this and every other programing
language group for over 10 years (preferably all at once). Let it go.
On Sat, Oct 3, 2009 at 2:53 AM, Chris Withers ch...@simplistix.co.uk wrote:
Xah Lee wrote:
Haskell has a new logo. A fantastic one. Beautiful. For creator,
On Thu, Oct 1, 2009 at 1:22 AM, Lanny lan.rogers.b...@gmail.com wrote:
I've been thinking about putting together a text based RPG written
fully in Python, possibly expanding to a MUD system. I'd like to know
if anyone feels any kind of need for this thing or if I'd be wasting
my time, and also
On Tue, Sep 22, 2009 at 7:25 PM, Nobody nob...@nowhere.com wrote:
On Mon, 21 Sep 2009 16:33:08 -0400, Jack Diederich wrote:
AIUI, as a python string is imutable, a slice of a string is a
new string which points (C char *) to the start of the slice data
and with a length that is the length
On Mon, Sep 21, 2009 at 4:00 PM, Rob Williscroft r...@freenet.co.uk wrote:
AIUI, as a python string is imutable, a slice of a string is a
new string which points (C char *) to the start of the slice data
and with a length that is the length of the slice, about 8 bytes
on 32 bit machine.
Not
Jack Diederich jackd...@gmail.com added the comment:
applied in r74638
and I've added you to Misc/ACKS
Thanks again for the patch!
--
resolution: - accepted
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Jack Diederich jackd...@gmail.com added the comment:
I think this is fixed by r74638 but it never triggered on my box (Ubuntu
9.x) so I can't be sure. What distro are you using?
--
assignee: - jackdied
nosy: +jackdied
___
Python tracker rep
Jack Diederich jackd...@gmail.com added the comment:
Thanks Rodrigo, I'll integrate this and check it in.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6582
Jack Diederich jackd...@gmail.com added the comment:
Thanks for the update Irek (and the help!). You are now listed in Misc/ACKS.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6106
On Mon, Jul 20, 2009 at 5:57 AM, casebashwalkr...@gmail.com wrote:
Hi,
I have searched this list and found out that Python doesn't have a
mutable string class (it had an inefficient one, but this was removed
in 3.0). Are there any libraries outside the core that offer this?
It depends on how
Jack Diederich jackd...@gmail.com added the comment:
fixed in r74217
My thanks to everyone who contributed to this bug. irek if you let me
know your name I'll add it to Misc/ACKS as well.
PS, The additional testcase is not ideal; it tests the bad behavior by
hooking into the debug output
New submission from Jack Diederich jackd...@gmail.com:
test/test_telnetlib.py has zero tests for the telnetlib.Telnet.write method.
--
assignee: jackdied
messages: 90963
nosy: jackdied
severity: normal
status: open
title: test_telnetlib doesn't test Telnet.write
versions: Python 2.7
Jack Diederich jackd...@gmail.com added the comment:
between r71434 and r74217 this should be fixed for 3.2.
Marking as closed.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5188
Jack Diederich jackd...@gmail.com added the comment:
this was fixed in r47215 (circa 2006). Marking closed.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1360221
Jack Diederich jackd...@gmail.com added the comment:
Marking closed/won't fix. ASCII strings are the byte-ish type in 2.x so
we should expect the caller to convert down from unicode when sending
bytes over the wire.
--
resolution: - wont fix
status: open - closed
Jack Diederich jackd...@gmail.com added the comment:
Marking as easy. What needs to be done is to add a small fake socket
class that redefines socket.sendall(self, bytes) to capture the args to
sock.sendall so it can be assertEqual'd to the expected bytes.
class SocketSendall(socket.socket
Jack Diederich jackd...@gmail.com added the comment:
The code that raises the error is in ceval.c which is a critical path.
The raise is done as soon the iterator has one more item than is needed
(see Daniel Diniz's comments on infinite iterators). While the check
could return more useful
Jack Diederich jackd...@gmail.com added the comment:
The stat module wasn't deprecated in 3.1, so is this now a non-issue?
If not, is it related to issue#1820?
--
nosy: +jackdied
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Jack Diederich jackd...@gmail.com added the comment:
I was looking at 3.x, JP's patch is relative to 2.x and takes a little
more unpacking (a couple function calls more) but looks to me to be the
same. In 2.x unpack_iterable() sets/returns an error once one item more
than is required
On Mon, Jul 20, 2009 at 10:00 AM, Steven
D'Apranost...@remove-this-cybersource.com.au wrote:
On Mon, 20 Jul 2009 09:34:24 +, Sion Arrowsmith wrote:
Terry Reedy tjre...@udel.edu wrote:
Sion Arrowsmith wrote:
Jack Diederich jackd...@gmail.com wrote:
It isn't an OrderedDict thing
On Fri, Jul 17, 2009 at 10:35 AM, Xavier Hocont...@xavierho.com wrote:
I changed my code to the following:
def nPrime(self, n):
Returns nth prime number, the first one being 2, where n = 0. When
n = 1, it returns 3.
for x in range(n+2):
try:
On Thu, Jul 16, 2009 at 2:21 AM, Mark Summerfieldl...@qtrac.plus.com wrote:
Hi,
I'm just wondering why , =, =, and are not supported by
collections.OrderedDict:
d1 = collections.OrderedDict(((a,1),(z,2),(k,3)))
d2 = d1.copy()
d2[z] = 4
d1 == d2
False
d1 d2
On Tue, Jul 14, 2009 at 5:44 PM, Ken Seehartk...@seehart.com wrote:
Almost every time I use decorators, I find myself wishing I had access
to the local namespace of the context from which the decorator is
executed. In practice, decorator is being applied to a method, so the
namespace in
New submission from Jack Diederich jackd...@gmail.com:
The core types use doubles, not floats. The file and function names
should reflect that (the docs already do).
--
components: None
messages: 90169
nosy: jackdied
severity: normal
status: open
title: Rename float*.[ch] to double.[ch
On Thu, Jul 2, 2009 at 2:36 PM, Carl Bankspavlovevide...@gmail.com wrote:
On Jul 2, 3:12 am, Ulrich Eckhardt eckha...@satorlaser.com wrote:
Bearophile wrote:
Ulrich Eckhardt:
a way to automatically release the resource, something
which I would do in the destructor in C++.
Is this
On Sat, Jun 13, 2009 at 2:11 PM, kjno.em...@please.post wrote:
Switching from Perl here, and having a hard time letting go...
Suppose I have an array foo, and that I'm interested in the 4th, 8th,
second, and last element in that array. In Perl I could write:
my @wanted = @foo[3, 7, 1,
On Thu, Jun 11, 2009 at 2:54 PM, Terry Reedytjre...@udel.edu wrote:
Jack Diederich wrote:
On Thu, Jun 11, 2009 at 12:03 AM, David M. Wilsond...@botanicus.net wrote:
[snip]
I found my answer: Python 2.6 introduces heap.merge(), which is
designed exactly for this.
Thanks, I knew Raymond
On Wed, Jun 10, 2009 at 6:24 PM, David Wilsond...@botanicus.net wrote:
During a fun coding session yesterday, I came across a problem that I
thought was already solved by itertools, but on investigation it seems
it isn't.
The problem is simple: given one or more ordered sequences, return
On Thu, Jun 11, 2009 at 12:03 AM, David M. Wilsond...@botanicus.net wrote:
[snip]
I found my answer: Python 2.6 introduces heap.merge(), which is
designed exactly for this.
Thanks, I knew Raymond added something like that but I couldn't find
it in itertools.
That said .. it doesn't help.
1 - 100 of 254 matches
Mail list logo