Re: Boolean Search using Strings

2015-04-23 Thread Jack Diederich
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.

Re: OAuth 2.0 implementation

2012-03-26 Thread Jack Diederich
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

[issue10522] test_telnet exception

2012-03-13 Thread Jack Diederich
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

Re: Guide to: Learning Python Decorators

2012-02-12 Thread Jack Diederich
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

Re: Debugging a difficult refcount issue.

2011-12-18 Thread Jack Diederich
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

Re: Implementing Python-OAuth2

2011-10-11 Thread Jack Diederich
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

Re: with statement and context managers

2011-08-02 Thread Jack Diederich
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

Re: Generator Frustration

2011-06-04 Thread Jack Diederich
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

[issue11812] transient test_telnetlib failure

2011-04-09 Thread Jack Diederich
Changes by Jack Diederich jackd...@gmail.com: -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11812 ___ ___ Python-bugs-list

Re: Problems with read_eager and Telnet

2011-02-28 Thread Jack Diederich
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

Re: Problems with read_eager and Telnet

2011-02-28 Thread Jack Diederich
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

Re: Problems with read_eager and Telnet

2011-02-28 Thread Jack Diederich
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

Re: Use the Source Luke

2011-01-28 Thread Jack Diederich
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

[issue10245] Fix resource warnings in test_telnetlib

2010-10-30 Thread Jack Diederich
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

[issue10176] telnetlib.Telnet.read_very_eager() performance

2010-10-25 Thread Jack Diederich
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

[issue7761] telnetlib Telnet.interact fails on Windows but not Linux

2010-10-24 Thread Jack Diederich
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

Re: ConFoo spam?

2010-10-07 Thread Jack Diederich
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*

Re: Python Programmer needed in the LA area

2010-10-07 Thread Jack Diederich
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)

[issue1673007] urllib2 requests history + HEAD support

2010-08-09 Thread Jack Diederich
Changes by Jack Diederich jackd...@gmail.com: -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1673007 ___ ___ Python-bugs-list

[issue2521] ABC caches should use weak refs

2010-08-05 Thread Jack Diederich
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

[issue9269] Cannot pickle self-referencing sets

2010-07-15 Thread Jack Diederich
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

[issue6960] test_telnetlib gives spurious output

2010-07-14 Thread Jack Diederich
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

[issue7761] telnetlib Telnet.interact fails on Windows but not Linux

2010-07-12 Thread Jack Diederich
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

[issue9110] contextlib.ContextDecorator

2010-07-09 Thread Jack Diederich
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

[issue9110] contextlib.ContextDecorator

2010-07-09 Thread Jack Diederich
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

[issue9110] contextlib.ContextDecorator

2010-07-09 Thread Jack Diederich
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

Re: is not operator?

2010-07-08 Thread Jack Diederich
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

[issue9118] help() on a property descriptor launches interactive help

2010-06-29 Thread Jack Diederich
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

Re: Efficiency/style issues of import module vs. from module import name, ...

2010-06-17 Thread Jack Diederich
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

Re: Community (A Modest Proposal)

2010-06-12 Thread Jack Diederich
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.

Re: Non Sequitur: Re: Python Forum

2010-06-08 Thread Jack Diederich
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

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
Changes by Jack Diederich jackd...@gmail.com: -- nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8847 ___ ___ Python-bugs-list

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
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

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
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

[issue8847] crash appending list and namedtuple

2010-06-04 Thread Jack Diederich
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

Re: Ugly modification of a class, can it be done better ?

2010-05-20 Thread Jack Diederich
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

[issue8708] OpenID blunder

2010-05-13 Thread Jack Diederich
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

[issue8707] Duplicated document in telnetlib.

2010-05-13 Thread Jack Diederich
Changes by Jack Diederich jackd...@gmail.com: -- assignee: d...@python - jackdied nosy: +jackdied ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8707

[issue8708] OpenID blunder

2010-05-13 Thread Jack Diederich
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

Re: Performance of list vs. set equality operations

2010-04-06 Thread Jack Diederich
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

Re: Classes as namespaces?

2010-03-26 Thread Jack Diederich
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

Re: Dynamic Class Creation

2010-03-16 Thread Jack Diederich
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

Re: Decorator to inject function into __call__ of a class

2010-03-13 Thread Jack Diederich
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

Re: class inheritance

2010-03-13 Thread Jack Diederich
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

Re: Decorator to inject function into __call__ of a class

2010-03-13 Thread Jack Diederich
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

Re: isinstance(False, int)

2010-03-05 Thread Jack Diederich
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

Re: isinstance(False, int)

2010-03-05 Thread Jack Diederich
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

Re: NoSQL Movement?

2010-03-03 Thread Jack Diederich
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

Re: Generic singleton

2010-03-03 Thread Jack Diederich
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

Re: Docstrings considered too complicated

2010-02-24 Thread Jack Diederich
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

[issue6825] Minor documentation bug with os.path.split

2010-02-23 Thread Jack Diederich
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

[issue6518] Enable 'with' statement in ossaudiodev module

2010-02-23 Thread Jack Diederich
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

[issue4331] Can't use _functools.partial() created function as method

2010-02-23 Thread Jack Diederich
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

[issue4331] Can't use _functools.partial() created function as method

2010-02-23 Thread Jack Diederich
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

[issue6560] socket sendmsg(), recvmsg() methods

2010-02-23 Thread Jack Diederich
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

[issue6560] socket sendmsg(), recvmsg() methods

2010-02-23 Thread Jack Diederich
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

[issue4331] Can't use _functools.partial() created function as method

2010-02-22 Thread Jack Diederich
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

[issue7850] platform.system() should be macosx instead of Darwin on OSX

2010-02-22 Thread Jack Diederich
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

[issue7646] test_telnetlib fails in Windows XP

2010-02-22 Thread Jack Diederich
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

[issue7463] PyDateTime_IMPORT() causes compiler warnings

2010-02-22 Thread Jack Diederich
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

[issue7366] weakref module example relies on behaviour not guaranteed by id()

2010-02-22 Thread Jack Diederich
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

[issue7196] Clarify str.split() behavior

2010-02-22 Thread Jack Diederich
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

[issue6886] cgi.py runs python, not python3

2010-02-22 Thread Jack Diederich
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

[issue6931] dreadful performance in difflib: ndiff and HtmlDiff

2010-02-22 Thread Jack Diederich
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

Re: list.extend([]) Question

2010-02-05 Thread Jack Diederich
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

Re: [Python-Dev] [RELEASED] Python 2.7 alpha 2

2010-01-09 Thread Jack Diederich
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

Re: Any Swisses here?

2010-01-03 Thread Jack Diederich
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

[issue7471] GZipFile.readline too slow

2009-12-11 Thread Jack Diederich
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

[issue7455] cPickle: stack underflow in load_pop()

2009-12-11 Thread Jack Diederich
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

Re: My own accounting python euler problem

2009-11-07 Thread Jack Diederich
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

[issue6748] test_debuglevel from test_telnetlib.py fails

2009-10-31 Thread Jack Diederich
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

[issue7207] test_telnetlib fails on OS X 10.6

2009-10-26 Thread Jack Diederich
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

Re: Haskell's new logo, and the idiocy of tech geekers

2009-10-03 Thread Jack Diederich
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,

Re: Python RPG Codebase

2009-10-01 Thread Jack Diederich
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

Re: socket send O(N**2) complexity

2009-09-22 Thread Jack Diederich
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

Re: socket send O(N**2) complexity

2009-09-21 Thread Jack Diederich
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

[issue6582] test_telnetlib doesn't test Telnet.write

2009-09-03 Thread Jack Diederich
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

[issue6748] test test_telnetlib failed

2009-09-03 Thread Jack Diederich
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

[issue6582] test_telnetlib doesn't test Telnet.write

2009-08-12 Thread Jack Diederich
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

[issue6106] read_until

2009-07-27 Thread Jack Diederich
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

Re: Mutable Strings - Any libraries that offer this?

2009-07-26 Thread Jack Diederich
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

[issue6106] read_until

2009-07-26 Thread Jack Diederich
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

[issue6582] test_telnetlib doesn't test Telnet.write

2009-07-26 Thread Jack Diederich
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

[issue5188] telnetlib process_rawq buffer handling is confused

2009-07-26 Thread Jack Diederich
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

[issue1360221] telnetlib expect() and read_until() do not time out properly

2009-07-26 Thread Jack Diederich
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

[issue1772794] Telnetlib dosn't accept u'only ascii'

2009-07-26 Thread Jack Diederich
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

[issue6582] test_telnetlib doesn't test Telnet.write

2009-07-26 Thread Jack Diederich
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

[issue3071] The ValueError raised by failing to unpack sequence should have more information.

2009-07-26 Thread Jack Diederich
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

[issue2874] Remove use of the stat module in the stdlib

2009-07-26 Thread Jack Diederich
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

[issue3071] The ValueError raised by failing to unpack sequence should have more information.

2009-07-26 Thread Jack Diederich
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

Re: Why aren't OrderedDicts comparable with etc?

2009-07-21 Thread Jack Diederich
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

Re: Try... except....Try again?

2009-07-17 Thread Jack Diederich
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:    

Re: Why aren't OrderedDicts comparable with etc?

2009-07-16 Thread Jack Diederich
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    

Re: decorators - would be nice if...

2009-07-14 Thread Jack Diederich
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

[issue6427] Rename float*.[ch] to double.[ch]

2009-07-06 Thread Jack Diederich
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

Re: Searching equivalent to C++ RAII or deterministic destructors

2009-07-03 Thread Jack Diederich
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

Re: Perl's @foo[3,7,1,-1] ?

2009-06-13 Thread Jack Diederich
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,

Re: itertools.intersect?

2009-06-11 Thread Jack Diederich
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

Re: itertools.intersect?

2009-06-10 Thread Jack Diederich
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

Re: itertools.intersect?

2009-06-10 Thread Jack Diederich
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   2   3   >