[issue22143] rlcompleter.Completer has duplicate matches

2015-02-22 Thread Lorenz Quack
Lorenz Quack added the comment: sorry it took so long but my contributor agreement is now signed. Do you want me to write a patch with the results sorted? If so, should I also change the docs to reflect that the results are sorted? This would then also affect other implementations because they

[issue22141] rlcompleter.Completer matches too much

2015-02-22 Thread Lorenz Quack
Lorenz Quack added the comment: sorry it took so long but the contributor agreement is now signed. -- ___ Python tracker <http://bugs.python.org/issue22

[issue22143] rlcompleter.Completer has duplicate matches

2014-10-31 Thread Lorenz Quack
Lorenz Quack added the comment: I couldn't find anything concerning order in the docs so I didn't see any reason the have them sorted. I'm not opposed to sorting them. I guess you could call me +0 on returning sorted(set(matches)) -- ___

[issue22772] doc error in __ifloordiv__ and __itruediv__

2014-10-31 Thread Lorenz Quack
New submission from Lorenz Quack: the doc string of __itruediv__ and __ifloordiv__ represent the operator as x/y and x//y respectively. This is obviously false and should be x/=y and x//=y patch attached -- assignee: docs@python components: Documentation files: inplace_div_doc.patch

[issue22143] rlcompleter.Completer has duplicate matches

2014-10-30 Thread Lorenz Quack
Lorenz Quack added the comment: Thanks for reviewing! test now use assertIn and assertIsNone as suggested PS: My Contributors Agreement is in progress. Just emailed the PSF with some question (but I intend to sign it) -- Added file: http://bugs.python.org/file37074/rlcompleter_22143

[issue22143] rlcompleter.Completer has duplicate matches

2014-10-29 Thread Lorenz Quack
Lorenz Quack added the comment: Hi, here finally the updated patch with test case. It depends on and should be applied after the patch included in issue22141. This patch does changes two things: 1) completions are now unique 2) completions are now in no specific order I had to touch some

[issue22141] rlcompleter.Completer matches too much

2014-10-29 Thread Lorenz Quack
Changes by Lorenz Quack : Added file: http://bugs.python.org/file37064/rlcompleter_22141.patch ___ Python tracker <http://bugs.python.org/issue22141> ___ ___ Python-bug

[issue22141] rlcompleter.Completer matches too much

2014-10-29 Thread Lorenz Quack
Changes by Lorenz Quack : Removed file: http://bugs.python.org/file37063/rlcompleter_22141.patch ___ Python tracker <http://bugs.python.org/issue22141> ___ ___ Python-bug

[issue22141] rlcompleter.Completer matches too much

2014-10-29 Thread Lorenz Quack
Lorenz Quack added the comment: sorry for the delay but here is a new patch with a test. I changed the strategy for fixing the bug because the dealing with the opening parenthesis became to complicated. So, now I simply check whether the match actually startswith the search phrase before

[issue22141] rlcompleter.Completer matches too much

2014-09-26 Thread Lorenz Quack
Lorenz Quack added the comment: Oops! tests sound like a good Idea. I realized my "fix" doesn't work. I had not noticed this before because in my application I had already implemented a workaround :/ The problem with catching the trailing parenthesis is that the group then does

[issue22141] rlcompleter.Completer matches too much

2014-08-05 Thread Lorenz Quack
Lorenz Quack added the comment: attached the mini patch changing the regular expression in the proposed way -- keywords: +patch Added file: http://bugs.python.org/file36269/rlcompleter.diff ___ Python tracker <http://bugs.python.org/issue22

[issue22143] rlcompleter.Completer has duplicate matches

2014-08-05 Thread Lorenz Quack
New submission from Lorenz Quack: Example: >>> import rlcompleter >>> completer = rlcompleter.Completer() >>> class A(object): ... foo = None >>> class B(A): ... pass >>> b = B() >>> print([completer.complete("b.foo", i

[issue22141] rlcompleter.Completer matches too much

2014-08-05 Thread Lorenz Quack
New submission from Lorenz Quack: Example: >>> completer = rlcompleter.Completer() >>> class A(object): ... def foo(): pass ... def foobar(): pass >>> completer.complete("A.foo(", 0) 'A.foo(' >>> completer.complete("A.foo(

[issue10247] mold builder

2010-10-30 Thread Lorenz Quack
New submission from Lorenz Quack : RV Plastics is your end to end partner for all your moulds and Injection Moulding requirements. Founded in 2003, RV Plastics dedicates itself to the plastic industry, exporting Plastic injection moulds and molded Components to customers spread over 20

[issue8113] PyUnicode_AsUnicode doesn't check for NULL pointer

2010-03-11 Thread Lorenz Quack
Lorenz Quack added the comment: Thanks for the fast replies. I used to groups some Python calls together and check in the end if any of them failed in one exception handling block. I will now check every call individually. I will open a new bug for documentation fixes where there is now

[issue8113] PyUnicode_AsUnicode doesn't check for NULL pointer

2010-03-10 Thread Lorenz Quack
Lorenz Quack added the comment: I thought that the CamelCase C-functions like PyUnicode_AsUnicode would check for errors like this and if you don't want error checking you can use the capitalized versions like PyUnicode_AS_UNICODE. I just looked at the code for PyFloat_AsDouble and it c

[issue8113] PyUnicode_AsUnicode doesn't check for NULL pointer

2010-03-10 Thread Lorenz Quack
New submission from Lorenz Quack : The C-API function "PyUnicode_AsUnicode(PyObject *unicode)" does not check the argument for NULL pointers. It passes it directly to the macro "PyUnicode_Check(op)" which then crashes when trying to access "Py_TYPE(op)". I marke

[issue7460] extended slicing not sufficiently covered in docs

2010-03-05 Thread Lorenz Quack
Lorenz Quack added the comment: When I wrote this bug report I was mainly thinking about the C-API documentation which doesn't mention extended slicing at all. Since the C-API isn't mentioned in the other bug I don't think it's a duplicate but they could maybe be m

[issue7460] extended slicing not sufficiently covered in docs

2009-12-08 Thread Lorenz Quack
New submission from Lorenz Quack : I find the documentation regarding extended slicing to be lacking. To be honest I couldn't find any documentation about it. The only - and quite good - source of information I found was [1]. Maybe I didn't search enough. If so I would appreciate a l

[issue6145] distutils.extension.read_setup_file misinterprets -C switch

2009-05-29 Thread Lorenz Quack
New submission from Lorenz Quack : I'm not sure if this is a bug or some weird backward-compatible behaviour... In "distutil.extension.read_setup_file" it checks for the "-C" switch but then appends "word" instead of "value" So if you pass &qu

[issue1944] Documentation for PyUnicode_AsString (et al.) missing.

2009-04-18 Thread Lorenz Quack
Lorenz Quack added the comment: Ok, here is my shot at a patch for at least some of the undocumented functions. Namely the following functions are being documented in the patch: PyUnicode_FromFormat PyUnicode_FromFormatV PyUnicode_FromString PyUnicode_FromStringAndSize

[issue1944] Documentation for PyUnicode_AsString (et al.) missing.

2009-04-18 Thread Lorenz Quack
Lorenz Quack added the comment: In addition to the above mentioned functions I found these to be undocumented: PyUnicode_DecodeUTF7 PyUnicode_DecodeUTF7Stateful PyUnicode_EncodeDecimal PyUnicode_EncodeUTF7 PyUnicode_FromFormat PyUnicode_FromString PyUnicode_FromStringAndSize

[issue5488] nb_inplace_divide slot is missing in docs

2009-03-14 Thread Lorenz Quack
New submission from Lorenz Quack : http://docs.python.org/c-api/typeobj.html#PyNumberMethods lists the slots in the PyNumberMethods struct used to implement the Number Protocol for extension types. The entry for "binaryfunc nb_inplace_divide;" is missing from this listing. It belon

[issue5443] trivial typo in itertools documentation

2009-03-10 Thread Lorenz Quack
Lorenz Quack added the comment: FWIW here is the patch. It is against r70267 of the trunk -- keywords: +patch message_count: 3.0 -> 4.0 Added file: http://bugs.python.org/file13291/itertools.patch ___ Python tracker <http://bugs.pyth

[issue5443] trivial typo in itertools documentation

2009-03-10 Thread Lorenz Quack
Lorenz Quack added the comment: Thanks for fixing. But I'm afraid you missed the second typo in this Bug. It's the same thing one line beneath the one you fixed. next time I'll attach a patch. I promise. -- message_count: 2.0 -> 3.0 stat

[issue5443] trivial typo in itertools documentation

2009-03-08 Thread Lorenz Quack
New submission from Lorenz Quack : In the docs: "http://docs.python.org/library/itertools.html#module-itertools"; In the table: "Iterators terminating on the shortest input sequence:" In row: "imap()" and "starmap()" In the column: &qu

[issue2650] re.escape should not escape underscore

2008-04-28 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: >> The loop in escape should really use enumerate >> instead of "for i in range(len(pattern))". > >It needs i to edit s[i]. enumerate(iterable) returns a tuple for each element in iterable containing th

[issue2250] rlcompleter raises Exception on bad input

2008-04-18 Thread Lorenz Quack
Changes by Lorenz Quack <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10054/rlcompleter.rst.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2250] rlcompleter raises Exception on bad input

2008-04-18 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: In the last patch I used the wrong ticks. I hope it's fine like this. Added file: http://bugs.python.org/file10055/rlcompleter.rst.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2250] rlcompleter raises Exception on bad input

2008-04-18 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: I attached a patch for the docs. It now states that the rlcompleter.Completer will catch and silence all exceptions raised by evaluating the expression passed to complete() Added file: http://bugs.python.org/file10054/rlcompleter.rs

[issue2250] rlcompleter raises Exception on bad input

2008-04-04 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: I confirmed that the rlcompleter can raise a SyntaxError on bad input. Upon further investigation I found that a ReferenceError could also be raised. I didn't check on other Exceptions. I attached a new version of the patch where

[issue2250] rlcompleter raises Exception on bad input

2008-03-26 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: I was thinking that the code in question could maybe also raise other exceptions. too bad I´m on vacation and can´t try this out myself. I believe the regular expression also matches something like import rlcompleter rlcompleter.Com

[issue2250] rlcompleter raises Exception on bad input

2008-03-24 Thread Lorenz Quack
Lorenz Quack <[EMAIL PROTECTED]> added the comment: I have no idea what or who NAS is but comments are always welcome :) concerning the documentation: I´ve never done it before but there is a first time for everything, right? I´m currently on vacation so I won´t look into it for at

[issue2250] rlcompleter raises Exception on bad input

2008-03-07 Thread Lorenz Quack
New submission from Lorenz Quack: in line 130 rlcompleter calls eval on the first part (before the last dot) of the input text. if that part is not valid it will raise an exception which is likely to crash a calling application. example 1: == import rlcompleter rlcompleter.Completer

[issue2220] bug in rlcompleter

2008-03-03 Thread Lorenz Quack
Lorenz Quack added the comment: Some more information: the dot in the example causes complete() to call self.attr_matches(text) which in turn performes the following call re.match(r"(\w+(\.\w+)*)\.(\w*)", text) and return None if there is no match. the complete method unconditionall

[issue2220] bug in rlcompleter

2008-03-03 Thread Lorenz Quack
New submission from Lorenz Quack: The following code would raise a TypeError: >>> rlcompleter.Completer().complete("print self.foo", 0) with this fix it will just return None -- components: Library (Lib) files: rlcompleter.patch keywords: patch messages: 63208 nosy: