New submission from Ralf W. Grosse-Kunstleve r...@yahoo.com:
The pydoc.HTMLRepr.multicolumn() method fails when using the Python
command-line option -Qnew.
The attached patch inserts two slashes for floor division. (I think the same
change was applied to Python 3 already
Ralf W. Grosse-Kunstleve r...@yahoo.com added the comment:
I've no access to HP machines anymore.
It's probably not worth anybody's time.
Ralf
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1465838
New submission from Ralf W. Grosse-Kunstleve [EMAIL PROTECTED]:
It would be very useful to add two lines to Modules/Setup.dist:
Index: Modules/Setup.dist
===
--- Modules/Setup.dist (revision 64489)
+++ Modules/Setup.dist (working
% python
Python 2.4.1 (#1, Apr 7 2005, 11:06:30) [C] on osf1V5
Type help, copyright, credits or license for more information.
execfile.__doc__
'execfile(filename[, globals[, locals]])\n\nRead and execute a Python script
from a file.\nThe globals and locals are dictionaries, defaulting to the
--- Mike Meyer [EMAIL PROTECTED] wrote:
Remember that what we're suggesting is just syntactic sugar.
BTW: That's true for all high-level language constructs. You could do
everything in machine language. A good language is the sum of lots of syntactic
sugar... selected with taste. :)
You can
--- Bengt Richter [EMAIL PROTECTED] wrote:
I still think it's too specialized. What would, hypothetically, this do?
class Bar: pass
class Foo:
x = Bar()
def method_1(self, x.y):
pass
It's hard to explain that you can autoassign self.y but not x.y.
No, that
--- Robert Williscroft [EMAIL PROTECTED] wrote:
My apologies for having to resort to email but for some reason I can't post
this message to comp.lang.python. I've tried about 4 times including
starting a
new thread, but for some reason it doesn't turn up, though I've followed
up on
--- Lonnie Princehouse [EMAIL PROTECTED] wrote:
IIRC, the self.__dict__.update(locals()) trick confuses psyco.
But you can make a decorator to achieve the same result. There's not
really a convincing case for extending python syntax.
Not if you have (enough memory for) psyco. :)
I am
--- Rob Williscroft [EMAIL PROTECTED] wrote:
def init_self( init ):
class KeywordArgumentError(Exception):
pass
vn = init.func_code.co_varnames[ 1 : init.func_code.co_argcount ]
def decorated_init(self, *args, **kw):
off = 0
for name in vn:
if not
--- Rob Williscroft [EMAIL PROTECTED] wrote:
class MyClass(object):
@init_self
def __init__( self, x, _y, z ):
print in __init__() _y =, _y
Here are the timings (script attached):
overhead: 0.01
plain_grouping: 0.26
update_grouping: 0.45
plain_adopt_grouping: 0.69
--- Kay Schluehr [EMAIL PROTECTED] wrote:
I stripped your code down to the essence. See attachment.
For the user your approach then becomes:
class grouping:
__metaclass__ = autoattr
def __init__(self, x, y, z):
pass
No. This is clearly NOT what I had in mind. I
--- NickC [EMAIL PROTECTED] wrote:
I'd be very interested to hear your opinion on the 'namespace' module,
which looks at addressing some of these issues (the Record object, in
particular). The URL is http://namespace.python-hosting.com, and any
comments should be directed to the [EMAIL
My initial proposal
(http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html) didn't
exactly get a warm welcome...
And Now for Something Completely Different:
class autoinit(object):
def __init__(self, *args, **keyword_args):
self.__dict__.update(
--- Kay Schluehr [EMAIL PROTECTED] wrote:
Ralf, if you want to modify the class instantiation behaviour you
I don't. I simply want to give the user a choice:
__init__(self, ...) # same as always (no modification)
or
__autoinit__(self, ...) # self.x=x job done automatically and
Sorry, I forgot the attachment.
Sell on Yahoo! Auctions no fees. Bid on great items.
http://auctions.yahoo.com/import sys, os
class plain_grouping:
def __init__(self, x, y, z):
self.x = x
self.y = y
self.z =
--- Scott David Daniels [EMAIL PROTECTED] wrote:
Should be:
class autoinit(object):
def __init__(self, *args, **keyword_args):
for name, value in zip(self.__autoinit__.im_func.func_code.
co_varnames[1:], args):
--- David Abrahams [EMAIL PROTECTED] wrote:
Recently people testing Boost.Python with GCC on Linux have reported
that the extensions being tested have to be compiled with exactly the
same version of GCC as the Python they're being loaded into, or they
get mysterious crashes.
That doesn't
Hi Michael,
Thanks for taking a careful look, and thanks for the balanced analysis!
Michael Chermside wrote:
A better name would help with this.
OK. After getting so many beatings I'd agree to anything. :)
The need for locals() is unavoidable.
It is in fact not unavoidable. I pointed to my
**
This posting is also available in HTML format:
http://cci.lbl.gov/~rwgk/python/adopt_init_args_2005_07_02.html
**
Hi fellow Python coders,
19 matches
Mail list logo