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
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
<http://bugs.python.org/issue16
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 havi
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
<http://bugs.python.org/issue16
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 for the
Changes by Carsten Klein :
Added file: http://bugs.python.org/file28478/issue16806.diff
___
Python tracker
<http://bugs.python.org/issue16806>
___
___
Python-bugs-list m
Changes by Carsten Klein :
Removed file: http://bugs.python.org/file28477/issue1680.diff
___
Python tracker
<http://bugs.python.org/issue16806>
___
___
Python-bugs-list m
Changes by Carsten Klein :
--
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
<http://bugs.python.org/issu
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
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
<http://bugs.python.
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
<http://bugs.python.org/issue16
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
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 that
Carsten Klein 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 instead of being called when no
Carsten Klein 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 you need to actually do this
New submission from Carsten Klein :
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 derived class:
class IFoo
Carsten Klein 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...
--
___
Python tracker
<h
New submission from Carsten Klein :
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
will fail decorating the class
Changes by Carsten Klein :
--
nosy: -carsten.kl...@axn-software.de
___
Python tracker
<http://bugs.python.org/issue11774>
___
___
Python-bugs-list mailin
Carsten Klein 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 tracker
<http://bugs.python.
Changes by Carsten Klein :
--
nosy: +carsten.klein -carsten.kl...@axn-software.de
___
Python tracker
<http://bugs.python.org/issue2193>
___
___
Python-bugs-list m
Carsten Klein added the comment:
I wonder how this happened...
Thanks for the finding!
--
___
Python tracker
<http://bugs.python.org/issue11774>
___
___
Pytho
Carsten Klein added the comment:
Ah, I see, thanks for the input. Will close this then.
--
___
Python tracker
<http://bugs.python.org/issue11774>
___
___
Pytho
Carsten Klein added the comment:
Nope, it only happens on issue [issue2193] Cookie Colon Name Bug
but not for this one.
--
___
Python tracker
<http://bugs.python.org/issue11
Carsten Klein added the comment:
It seems that it only happens when commenting upon an existing issue.
--
___
Python tracker
<http://bugs.python.org/issue11
New submission from Carsten Klein :
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 notification mails twice
Carsten Klein 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?
--
___
Python tracker
<h
Carsten Klein added the comment:
Ups forgot to also mention the production rule for token, which is defined in
the HTTP RFC RFC2616:
token = 1*
separators
Carsten Klein 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= token | quo
Carsten Klein 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 on cookies, which also was
Carsten Klein 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)
+except Cookie
Carsten Klein 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'])
+#self.incookie.load
Carsten Klein 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 that, and most important: The
New submission from Carsten Klein :
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 the keys in a somewhat random order
Carsten Klein added the comment:
Thanks for the information. Where is this documented? I cannot find it in the
official Python docs... TIA.
--
___
Python tracker
<http://bugs.python.org/issue9
New submission from Carsten Klein :
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 to the fact that the fro
36 matches
Mail list logo