[issue12182] pydoc.py integer division problem

2011-05-25 Thread Ralf W. Grosse-Kunstleve
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

[issue1465838] HP-UX11i: illegal combination of compilation and link flags

2010-08-21 Thread Ralf W. Grosse-Kunstleve
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

[issue3183] sha modules Modules/Setup.dist

2008-06-23 Thread Ralf W. Grosse-Kunstleve
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

Re: How can I import a py script by its absolute path name?

2005-07-14 Thread Ralf W. Grosse-Kunstleve
% 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

Re: __autoinit__

2005-07-12 Thread Ralf W. Grosse-Kunstleve
--- 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

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-11 Thread Ralf W. Grosse-Kunstleve
--- 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

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-11 Thread Ralf W. Grosse-Kunstleve
--- 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

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-11 Thread Ralf W. Grosse-Kunstleve
--- 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

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-11 Thread Ralf W. Grosse-Kunstleve
--- 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

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-11 Thread Ralf W. Grosse-Kunstleve
--- 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

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-10 Thread Ralf W. Grosse-Kunstleve
--- 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

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-09 Thread Ralf W. Grosse-Kunstleve
--- 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

__autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-09 Thread Ralf W. Grosse-Kunstleve
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(

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-09 Thread Ralf W. Grosse-Kunstleve
--- 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

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-09 Thread Ralf W. Grosse-Kunstleve
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 =

Re: __autoinit__ (Was: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code)

2005-07-09 Thread Ralf W. Grosse-Kunstleve
--- 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):

Re: Compatibility of recent GCC/Python versions

2005-07-06 Thread Ralf W. Grosse-Kunstleve
--- 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

Re: Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-05 Thread Ralf W. Grosse-Kunstleve
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

Proposal: reducing self.x=x; self.y=y; self.z=z boilerplate code

2005-07-02 Thread Ralf W. Grosse-Kunstleve
** 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,