[issue17067] Examples in documentation for 3.x in 23.1.3.4. Deferred translations are rather weak

2013-01-28 Thread Carsten Klein
New submission from Carsten Klein: The examples for the topic presented are rather weak. In fact, they merely present do nothing replacements for an actually working, deferred localization mechanism or some sort of prototypical implementation thereof. As such I propose that they be replaced

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2012-12-30 Thread Carsten Klein
Carsten Klein added the comment: I have created a patch for Python 2.7.3 that fixes the issue for that release, too. -- Added file: http://bugs.python.org/file28499/python2.7.3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-29 Thread Carsten Klein
Carsten Klein added the comment: Please see the attached patch that will resolve the issue. It also includes a test case in test_ast.py. What the patch does is as follows: - tok_state is extended by two fields, namely first_lineno and multi_line_start - first_lineno will be set by tok_get

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2012-12-29 Thread Carsten Klein
Changes by Carsten Klein carsten.kl...@axn-software.de: -- title: col_offset is -1 for multiline string expressions resembling docstrings - col_offset is -1 and lineno is wrong for multiline string expressions ___ Python tracker rep

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2012-12-29 Thread Carsten Klein
Changes by Carsten Klein carsten.kl...@axn-software.de: Removed file: http://bugs.python.org/file28477/issue1680.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16806

[issue16806] col_offset is -1 and lineno is wrong for multiline string expressions

2012-12-29 Thread Carsten Klein
Changes by Carsten Klein carsten.kl...@axn-software.de: Added file: http://bugs.python.org/file28478/issue16806.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16806

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-29 Thread Carsten Klein
Carsten Klein added the comment: The problem with this is that at the time that pydoc gets the information via inspect, the numbers have already been parsed as long or double and the original notation is no longer available. This is due to the fact that during build of the AST node

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-29 Thread Carsten Klein
Carsten Klein added the comment: Here are some links into the sources: Python/ast.c, ast_for_atom(), line 1872ff. Python/ast.c, parsenumber(), line 3632ff. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16801

[issue16801] Preserve original representation for integers / floats in docstrings

2012-12-29 Thread Carsten Klein
Carsten Klein added the comment: However, hinting inspect to use a different format when serializing the default values for existing keyword parameters of methods or functions seems to be a good idea and +1 by me for that. Personally, I'd rather have the decorator based solution than having

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-28 Thread Carsten Klein
New submission from Carsten Klein: Given an input module such as class klass(object): multi line comment continued on this line single line comment Another multi line comment and implementing a custom ast.NodeVisitor such as import as class CustomVisitor

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-28 Thread Carsten Klein
Carsten Klein added the comment: Please note that, regardless of the indent level, the col_offset for multi line str expressions will always be -1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16806

[issue16806] col_offset is -1 for multiline string expressions resembling docstrings

2012-12-28 Thread Carsten Klein
Carsten Klein added the comment: In addition, the reported lineno will be set to the last line of the multi line string instead of the first line where parsing the parse began parsing the string. -- ___ Python tracker rep...@bugs.python.org http

[issue12370] Use of super overwrites use of __class__ in class namespace

2012-10-02 Thread Carsten Klein
Carsten Klein added the comment: The change was introduced in r30 (Python/symtable.c @ near where it reads /* Special-case super: it counts as a use of __class__ */) which now enforces that a class that calls super on init will have the correct class information present. I do not think

[issue11788] Decorator class with optional arguments and a __call__ method gets not called when there are no arguments

2011-04-06 Thread Carsten Klein
New submission from Carsten Klein carsten.kl...@axn-software.de: Scenario: class deco(object): def __init__(self, optional = False): self._optional = optional def __call__(self, decorated): decorated.optional = self._optional return decorated @deco class y(object): pass

[issue11788] Decorator class with optional arguments and a __call__ method gets not called when there are no arguments

2011-04-06 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: will fail decorating the class since y... actually means that instead of an instance of class y, an instance of the decorator class will be returned, with y being lost along the way

[issue11789] Extend upon metaclass/type class documentation, here: zope.interface and usage of instances of classes as base classes

2011-04-06 Thread Carsten Klein
New submission from Carsten Klein carsten.kl...@axn-software.de: In zope.interface, you have something the following construct: class InterfaceBase: pass Interface = InterfaceBase() Using the above Interface as a derivation base for your own classes, will make that instance a type

[issue11788] Decorator class with optional arguments and a __call__ method gets not called when there are no arguments

2011-04-06 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: I think it is, actually, considering @foo @bar class A: pass with foo and bar being both decorator classes, the chained call foo(bar(A)) will return and instance of foo instead of A With decorator classes

[issue11788] Decorator class with optional arguments and a __call__ method gets not called when there are no arguments

2011-04-06 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Ok, looks like a valid work around to me. However, IMO it is not the same as with decorator functions. These will be called and will return the correct result, whereas the decorator class will instead return an instance of self

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Guess you are right... I did overlook the quoted-string reference in the RFC: av-pair = attr [= value]; optional value attr= token value = word word

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Ups forgot to also mention the production rule for token, which is defined in the HTTP RFC RFC2616: token = 1*any CHAR except CTLs or separators separators

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Perhaps the best solution would be for the Python cookie module to gracefully adapt to servers not quoting cookie values as is required by the RFCs and make these quoted-strings instead

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
New submission from Carsten Klein carsten.kl...@axn-software.de: Currently I am receiving duplicates of the notification mails by your issue tracker. -- messages: 133062 nosy: carsten.kl...@axn-software.de priority: normal severity: normal status: open title: Issue tracker sends

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: It seems that it only happens when commenting upon an existing issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11774

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Nope, it only happens on issue [issue2193] Cookie Colon Name Bug but not for this one. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11774

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Ah, I see, thanks for the input. Will close this then. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11774

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: I wonder how this happened... Thanks for the finding! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11774

[issue2193] Cookie Colon Name Bug

2011-04-05 Thread Carsten Klein
Changes by Carsten Klein carsten.kl...@axn-software.de: -- nosy: +carsten.klein -carsten.kl...@axn-software.de ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2193

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Actually I logged in using carsten.kl...@axn-software.de and the tracker changed my login name to that... Will issue a bug against the tracker... -- nosy: +carsten.klein ___ Python

[issue11774] Issue tracker sends notification mails twice...

2011-04-05 Thread Carsten Klein
Changes by Carsten Klein carsten.kl...@axn-software.de: -- nosy: -carsten.kl...@axn-software.de ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11774

[issue2193] Cookie Colon Name Bug

2011-02-03 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: if you'd take a close look at the following lines accepted as part of the patch for stripping out unwanted/non standard cookies over trac: +try: +old_set(key, real_value, coded_value

[issue2193] Cookie Colon Name Bug

2011-02-03 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Besides that, BM is wrong in the assumption that *who ever he is* Davi M. Kristol states that the colon is a valid character. There is no such notion in the article. In fact, DMK repeats the definition found in the original RFC

[issue2193] Cookie Colon Name Bug

2011-01-28 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Personally I believe that this is WONTFIX. Why? Because, the original RFC states that the colon is part of the unwanted characters, regardless of whether Perl or other similar implementations ignore the standard. Besides

[issue2193] Cookie Colon Name Bug

2011-01-28 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: One more: if you look closer at the accepted patch by CMLENZ over @ t.e.o., you will find: if self.req.headers_in.has_key('Cookie'): -self.incookie.load(self.req.headers_in['Cookie

[issue9659] frozenset, when subclassed will yield warning upon call to super(...).__init__(iterable)

2010-08-25 Thread Carsten Klein
Carsten Klein carsten.kl...@axn-software.de added the comment: Thanks for the information. Where is this documented? I cannot find it in the official Python docs... TIA. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9659

[issue9680] Add in declaration order support for the dictionary passed in to the meta class __init__ and __new__ methods

2010-08-25 Thread Carsten Klein
New submission from Carsten Klein carsten.kl...@axn-software.de: Example class Meta(type): def __new__(cls, name, bases, locals): print repr(locals.keys()) class Test(object): __metaclass__ = Meta A = 1 B = 2 C = 3 D = 4 E = 5 The above will yield

[issue9659] frozenset, when subclassed will yield warning upon call to super(...).__init__(iterable)

2010-08-22 Thread Carsten Klein
New submission from Carsten Klein carsten.kl...@axn-software.de: Example class a(frozenset): def __init__(self, iterable): super(a, self).__init__(iterable) i = a([1,2,3]) __main__:3: DeprecationWarning: object.__init__() takes no parameters a([1, 2, 3]) This might be due