Re: Unsupported operand types in if/else list comprehension

2009-04-11 Thread George Sakkis
On Apr 11, 4:26 pm, Mike H cmh.pyt...@gmail.com wrote: George, I'd love to. Can you give me an idea of where to start looking? I've gone through a couple of books, and Googled a ton of websites. Maybe I'm just not using the right terms. My background is definitely not CompSci. But if you'd

Re: absolute newbie: divide a list into sublists (nested lists?) of fixed length

2009-04-11 Thread George Sakkis
, 0.9645675 ], [ 0.84971586, 0.05786009, 0.9645675 ]]) HTH, George -- http://mail.python.org/mailman/listinfo/python-list

Re: absolute newbie: divide a list into sublists (nested lists?) of fixed length

2009-04-11 Thread George Sakkis
On Apr 11, 6:05 pm, ergconce...@googlemail.com wrote: On Apr 11, 11:18 pm, George Sakkis george.sak...@gmail.com wrote: The numpy import *is* important if you want to use numpy-specific features; there are many tricks you can do easily with numpy arrays that you have to write manually

Re: Returning different types based on input parameters

2009-04-08 Thread George Sakkis
On Apr 7, 3:18 pm, Adam Olsen rha...@gmail.com wrote: On Apr 6, 3:02 pm, George Sakkis george.sak...@gmail.com wrote: For example, it is common for a function f(x) to expect x to be simply iterable, without caring of its exact type. Is it ok though for f to return a list for some types

Re: object knows which object called it?

2009-04-06 Thread George Sakkis
and NOT the calling function. Read up on descriptors [1], it seems that's what you're looking for. HTH, George [1] http://users.rcn.com/python/download/Descriptor.htm -- http://mail.python.org/mailman/listinfo/python-list

Returning different types based on input parameters

2009-04-06 Thread George Sakkis
that are applicable to such situations ? George -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning different types based on input parameters

2009-04-06 Thread George Sakkis
` happens to be a builtin (e.g. float or list). Technically you can subclass builtins but I think, in this case at least, the cure is worse than the disease. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Returning different types based on input parameters

2009-04-06 Thread George Sakkis
On Apr 6, 7:57 pm, andrew cooke and...@acooke.org wrote: andrew cooke wrote: George Sakkis wrote: That's more of a general API design question but I'd like to get an idea if and how things are different in Python context. AFAIK it's generally considered bad form (or worse) for functions

[issue5697] heapq.nlargest does not perform stable sort

2009-04-05 Thread George Sakkis
New submission from George Sakkis george.sak...@gmail.com: According to the docs, heapq.nlargest should be equivalent to sorted(iterable, key=key, reverse=True)[:n], and since sorted() is stable, so should heapq.nlargest be. This is not the case: s =[ ('Mike', -1), ('John', 3), ('George', 2

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-05 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: Posted recipe at http://code.activestate.com/recipes/576712/. You were right, the implementation gets significantly hairier but I think it's worth having this option. It's also faster than using sorted/bisect as len(seq)/N increases

[issue5697] heapq.nlargest does not perform stable sort

2009-04-05 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: Should have checked a recent version first; that's from 2.5 (r25:51908, Sep 19 2006, 09:52:17). Sorry for the noise. -- status: open - closed ___ Python tracker rep...@bugs.python.org http

Re: Best way to extract from regex in if statement

2009-04-03 Thread George Sakkis
): mapping[rx] = func return func return deco d = {} @rxhandler(^DATASET:\s*(.+) , d) def handle_dataset(match): ... @rxhandler(^AUTHORS:\s*(.+) , d) def handle_authors(match): ... HTH, George -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythoner,Wish me luck!

2009-04-03 Thread George Sakkis
recommend it. George [1] http://ipython.scipy.org/ -- http://mail.python.org/mailman/listinfo/python-list

Re: simple iterator question

2009-04-02 Thread George Sakkis
/recipes/528936/ HTH, George -- http://mail.python.org/mailman/listinfo/python-list

[issue5669] Extra heap nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
New submission from George Sakkis george.sak...@gmail.com: It would be useful in many cases if heapq.nlargest and heapq.nsmallest grew an optional boolean parameter, say `ties` (defaulting to False) that when True, it would return more than `n` items if there are ties. To illustrate: s

[issue5669] Extra heap nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: The second call should of course be: for i in xrange(1,len(s)+1): print i,heapq.nsmallest(i,s,ties=True) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
Changes by George Sakkis george.sak...@gmail.com: -- title: Extra heap nlargest/nsmallest option for including ties - Extra heapq nlargest/nsmallest option for including ties ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: There's nothing special about my use cases; I'd even go as far as to suggest that this is more often than not the desired behavior in general. Say that you have to select the top 3 chess players and there are two players with equal Elo

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: In that case, I think it best to leave nsmallest/nlargest as-is. By appending ties to the result, it becomes harder to implement policy decisions on what to do with those ties (perhaps listing them separately or splitting

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: That should have been: last = result[-1]; [last]*s.count(last). Nice, though that's not equivalent if the objects' identity is significant for what happens next (which typically is the case when ties are preserved). The sorted/bisect

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
Changes by George Sakkis george.sak...@gmail.com: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5669 ___ ___ Python-bugs

[issue5669] Extra heapq nlargest/nsmallest option for including ties

2009-04-02 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: I recommend posting an ASPN recipe. That's what I do with a lot of ideas that are under development or that don't clear the bar for going into the standard library. Will do. Thanks for the quick turnaround

RE: make money!!!!

2009-03-31 Thread Grimes, George
April fools day is not until tomorrow. Your joke is a day early. George A. Grimes 972-995-0190 - Desk 214-205-0244 - Cell -Original Message- From: filmmaker [mailto:centrixfi...@gmail.com] Sent: Tuesday, March 31, 2009 3:47 PM To: python-list@python.org Subject: make money

Re: supervisor 3.0a6 and Python2.6

2009-03-19 Thread George Trojan
Raymond Cote wrote: George Trojan wrote: 1. Is supervisor still developed? I note that, although the information on the site is pretty old, there have been some respository checkins in Feb and March of this year: http://lists.supervisord.org/pipermail/supervisor-checkins/ -r I found

Disable automatic interning

2009-03-18 Thread George Sakkis
'*1 True 'x' is str('x') True 'x' is str('x')+str('') True 'x' is str.__new__(str,'x') True George -- http://mail.python.org/mailman/listinfo/python-list

Re: How complex is complex?

2009-03-18 Thread George Sakkis
a function call on every round). - broken (creates a new dict instead of modifying the original in place). Really, there's not much of a dilemma here. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Disable automatic interning

2009-03-18 Thread George Sakkis
On Mar 18, 2:13 pm, R. David Murray rdmur...@bitdance.com wrote: George Sakkis george.sak...@gmail.com wrote: Is there a way to turn off (either globally or explicitly per instance) the automatic interning optimization that happens for small integers and strings (and perhaps other types

Re: Disable automatic interning

2009-03-18 Thread George Sakkis
Node class. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Disable automatic interning

2009-03-18 Thread George Sakkis
On Mar 18, 4:50 pm, andrew cooke and...@acooke.org wrote: this is completely normal (i do exactly this all the time), BUT you should use ==, not is.   Typically, but not always; for example check out the identity map [1] pattern used in SQLAlchemy [2]. George [1] http://martinfowler.com

Re: Candidate for a new itertool

2009-03-18 Thread George Sakkis
) cur = next yield group George [1] http://code.activestate.com/recipes/521877/ -- http://mail.python.org/mailman/listinfo/python-list

supervisor 3.0a6 and Python2.6

2009-03-17 Thread George Trojan
be a reasonable alternative to supervisor? I know of upstart and daemontools. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Stopping SocketServer on Python 2.5

2009-03-12 Thread David George
On 2009-03-12 08:03:06 +, Mark Tolonen metolone+gm...@gmail.com said: Falcolas garri...@gmail.com wrote in message news:1b6a95a4-5680-442e-8ad0-47aa9ea08...@w1g2000prk.googlegroups.com... On Mar 11, 1:11 pm, David George d...@eatmyhat.co.uk wrote: Again, problem here is the issue

Re: Stopping SocketServer on Python 2.5

2009-03-11 Thread David George
On 2009-03-11 04:36:29 +, Mark Tolonen metolone+gm...@gmail.com said: David George d...@eatmyhat.co.uk wrote in message news:00150e67$0$27956$c3e8...@news.astraweb.com... Hi guys, I've been developing some code for a university project using Python. We've been working on an existing

Re: Stopping SocketServer on Python 2.5

2009-03-11 Thread David George
On 2009-03-11 19:02:26 +, Falcolas garri...@gmail.com said: On Mar 11, 12:28 pm, David George wrote: On 2009-03-11 04:36:29 +, Mark Tolonen metolone+gm...@gmail.com s aid: David George d...@eatmyhat.co.uk wrote in message news:00150e67$0$27956$c3e8...@news.astraweb.com... Hi

Stopping SocketServer on Python 2.5

2009-03-10 Thread David George
Hi guys, I've been developing some code for a university project using Python. We've been working on an existing codebase, cleaning it up and removing dead wood. We decided to make some changes to internal message handling by using a SocketServer, which worked great when we were using 2.6,

[issue5464] msgfmt.py does not work with plural form

2009-03-09 Thread Stephen George
New submission from Stephen George steve_...@optusnet.com.au: It seems that C:\Python26\Tools\i18n\msgfmt.py does not work with PO files that use plural form. Get the following error. ERRORTraceback (most recent call last): File C:\Python26\Tools\i18n\msgfmt.py, line 203, in module

FW: Anyone read Python Interview Questions: Python Certification Review?

2009-03-04 Thread Grimes, George
a coherent presentation. It sounds like the sort of thing to avoid. I'm just learning Python myself and I'll look elsewhere. George George A. Grimes 972-995-0190 - Desk 214-205-0244 - Cell The major difference between a thing that might go wrong and a thing that cannot possibly go wrong

[issue5344] typo in what's new in 2.6

2009-02-21 Thread George Yoshida
New submission from George Yoshida qui...@users.sourceforge.net: In What's new in 2.6 PEP 343 section, the following sentence lacks a closing parenthesis: The expression is evaluated, and it should result in an object that supports the context management protocol (that is, has __enter__

[issue5302] Allow package_data globs match directories

2009-02-18 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: I am no in favor of MANIFEST.in removal because I find it very convenient to define what is included in a package and I rarely use package_data or data_files. AFAIK the MANIFEST is used only by sdist; what's the point of including

[issue5300] Distutils ignores file permissions

2009-02-18 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: what is your use case of having executable file here ? I'd use the 'scripts' metadata for that ? For one thing they are external binaries, not python scripts, and second they are used internally only (through Subprocess

[issue5300] Distutils ignores file permissions

2009-02-17 Thread George Sakkis
New submission from George Sakkis george.sak...@gmail.com: Distutils ignores file permissions when copying modules and package_data files to the build directory, and consequently to the installation directory too. According to an XXX comment at distutils/command/build_py.py, this is deliberate

[issue5302] Allow package_data globs match directories

2009-02-17 Thread George Sakkis
New submission from George Sakkis george.sak...@gmail.com: Currently each glob defined in package_data must match files only; if it matches a directory, it raises an exception later when calling copy_file(). This means that a glob like 'mydata/*' will fail if there is any subdirectory under

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-17 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: Opened #5300 and #5302 for the mentioned issues. Btw in your patch, I believe `os.path.join(dirname, f)` should be replaced by `f` alone; `dirname` refers to the dir under the installation directory, not the source

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-16 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: FWIW I wrote a module that overrides the default build_py and sdist commands with versions that allow specifying package_data recursively Maybe that could be a new feature ? That would be nice, especially if we want to reimplement

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-16 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: done in r69692 and r69696. Great, thanks. The data_files part though seems incorrect; for one thing each item in data_files can be either a (dir,files) tuple or a plain string, and for two 'dir' is the output (installation) directory

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-15 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: By an equivalent option in setup() of course. I'm not against the *functionality* of MANIFEST.in but on that (a) it's a second file you have to remember to write and maintain in addition to setup.py (b) has its own ad-hoc syntax instead

[issue2279] distutils sdist add_defaults does not add data_files

2009-02-13 Thread George Sakkis
George Sakkis george.sak...@gmail.com added the comment: I didn't mean to imply that automagic discovery based on external version control software is better than MANIFEST.in; I favor explicitness here as well. It's just that this information can (and often has to) be duplicated in setup.py

Re: Pexpect and telnet not communicating properly

2009-01-27 Thread George Trojan
._last, self.before, self.match.group(0), self.after) return rc def close(self): self.pipe.close() self.pipe = None self.socket.close() self.socket = None George -- http://mail.python.org/mailman/listinfo/python-list

RE: Problem with IDLE on windows XP

2009-01-20 Thread Grimes, George
! George George A. Grimes 972-995-0190 - Desk 214-205-0244 - Cell Failure is the opportunity to begin again, more intelligently. Henry Ford -Original Message- From: python-list-bounces+georgegrimes=ti@python.org [mailto:python-list-bounces+georgegrimes=ti@python.org] On Behalf

Problem with IDLE on windows XP

2009-01-19 Thread Grimes, George
? Thanks, George George A. Grimes 972-995-0190 - Desk 214-205-0244 - Cell Failure is the opportunity to begin again, more intelligently. Henry Fordhttp://www.woopidoo.com/business_quotes/authors/henry-ford-quotes.htm -- http://mail.python.org/mailman/listinfo/python-list

Preserving file permissions with distutils

2009-01-14 Thread George Sakkis
submit a bug report ? George -- http://mail.python.org/mailman/listinfo/python-list

[issue4734] broken link for 2.5.3 doc download

2008-12-23 Thread George Yoshida
New submission from George Yoshida qui...@users.sourceforge.net: Download page for 2.5.3 documantation is not ready. --- Go to Documentation top page: http://docs.python.org/ click Previous versions click Python 2.5.3 click Download all these documents But this URL, http://www.python.org

[issue4721] pythonw.exe crash in GU application(PythonWX)

2008-12-22 Thread George
New submission from George g...@mail.gr: I have Python 2.6.1 in Windows Vista. It happened in Python 2.6 and I hoped it would be fixed. I don't know what happenes in other versions. When I open a file containing a python program(.py/.pyw and even one compiled with py2exe) made by using

[issue4721] pythonw.exe crash in GUI application(PythonWX)

2008-12-22 Thread George
Changes by George g...@mail.gr: -- title: pythonw.exe crash in GU application(PythonWX) - pythonw.exe crash in GUI application(PythonWX) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4721

Re: Python is slow

2008-12-15 Thread George Sakkis
On Dec 15, 8:15 am, Luis M. González luis...@gmail.com wrote: On Dec 15, 1:38 am, cm_gui cmg...@gmail.com wrote: hahaha, do you know how much money they are spending on hardware to make youtube.com fast??? By the way... I know of a very slow Python site called YouTube.com. In fact,

Re: Mathematica 7 compares to other languages

2008-12-12 Thread George Neuner
On Wed, 10 Dec 2008 21:37:34 + (UTC), Kaz Kylheku kkylh...@gmail.com wrote: Now try writing a device driver for your wireless LAN adapter in Mathematica. Notice how Xah chose not to respond to this. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematica 7 compares to other languages

2008-12-12 Thread George Neuner
be accessed as a vector of length (dim1 * dim2 * ... * dimN). This code handles arrays of any dimensionality. The poorly named argument 'dim' specifies the total number of elements in the array. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematica 7 compares to other languages

2008-12-12 Thread George Neuner
On Mon, 8 Dec 2008 15:14:18 -0800 (PST), Xah Lee xah...@gmail.com wrote: Dear George Neuner, Xah Lee wrote: For example, the level or power of lang can be roughly order as this: assembly langs C, pascal C++, java, c# unix shells perl, python, ruby, php lisp Mathematica George wrote

Re: Best way to report progress at fixed intervals

2008-12-10 Thread George Sakkis
not have admin access to) to use the new module. How is this different from writing your own module from scratch ? You don't need admin access to use a 3rd party package. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-12-10 Thread George Sakkis
On Dec 10, 1:42 pm, cm_gui [EMAIL PROTECTED] wrote: http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-... I fully agree with Krzysztof Kowalczyk . Can't they build a faster VM for Python since they love the language so much? WTF is Krzysztof Kowalczyk and why should we

Re: How to initialize a class variable once

2008-12-09 Thread George Sakkis
== '__main__': assert foo.__module__ == Bar.__module__ == 'myscript' George -- http://mail.python.org/mailman/listinfo/python-list

Re: as keyword woes

2008-12-09 Thread George Sakkis
and readable. I believe the responsibility to not abuse the power of the language should be on the application programmer, not the language designer. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Best way to report progress at fixed intervals

2008-12-09 Thread George Sakkis
): http://pypi.python.org/pypi/progressbar/. HTH, George -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematica 7 compares to other languages

2008-12-08 Thread George Neuner
in the first place. George -- http://mail.python.org/mailman/listinfo/python-list

Re: how to get a beep, OS independent ?

2008-12-07 Thread George Sakkis
? And what version dependency are you referring to? Well some of you actually hear something, I don't, so I expect that the Python version differs. Works for me on WinXP, Python 2.5: C:\python -c print chr(7) makes a beep. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Rich Comparisons Gotcha

2008-12-07 Thread George Sakkis
foundations of mathematics collapses into a steaming pile of rubble. And why doesn't this happen with the current behavior if x = y = log (-5) ? According to the same proof, -5 != -5. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't you just love writing this sort of thing :)

2008-12-05 Thread George Sakkis
On Dec 5, 8:06 am, Marco Mariani [EMAIL PROTECTED] wrote: Steven D'Aprano wrote: Gosh Lawrence, do tell, which category do YOU fall into? I suppose a mix-up between a cowbody (or Fonzie) coder and a troll. Naah.. more likely an (ex?) Lisper/Schemer. --

Re: Pythonic design patterns

2008-12-04 Thread George Sakkis
. No, really.) Obligatory reading: http://www.mortendahl.dk/thoughts/blog/view.aspx?id=122 George -- http://mail.python.org/mailman/listinfo/python-list

Re: Overriding a method at the instance level on a subclass of a builtin type

2008-12-04 Thread George Sakkis
partial a.foo = partial(a_foo,a) a.foo() a_foo George -- http://mail.python.org/mailman/listinfo/python-list

Re: Overriding a method at the instance level on a subclass of a builtin type

2008-12-04 Thread George Sakkis
On Dec 4, 1:03 pm, Zac Burns [EMAIL PROTECTED] wrote: Ok... but why are the special methods handled differently? Because otherwise they wouldn't be special ;-) And also for performance and implementation reasons I believe. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3 read() function

2008-12-04 Thread George Sakkis
much more modest slowdown (2-3X) if I repeat many times each run. George -- http://mail.python.org/mailman/listinfo/python-list

Re: RELEASED Python 3.0 final

2008-12-04 Thread George Sakkis
it ?? Does anyone have a link where this was decided ? George -- http://mail.python.org/mailman/listinfo/python-list

using distutils to cross-compile extensions?

2008-12-04 Thread Michael George
Hi, Please CC me in replying as I am off list. I have an extension module that I've built using distutils. I wonder if it's possible to use distutils to cross-compile it for windows on my linux box, and whether the pain involved is great. Can anyone point me in the right direction?

building an extension module with autotools?

2008-12-03 Thread Michael George
Hello, (Please CC me in replies, as I am off-list) I'm building an application (a game) in python, with a single C module containing some performance-critical code. I'm trying to figure out the best way to set it up to build. Distutils seems to be designed only for building and

Re: building an extension module with autotools?

2008-12-03 Thread Michael George
Gerhard Häring wrote: Michael George wrote: I've tried using automake, In my opinion, this is serious overkill. automake is good for making stuff work on a herd of different Unixen with various combinations of libc functions available etc. But for developing a Python extension, it doesn't

Re: building an extension module with autotools?

2008-12-03 Thread Michael George
Martin v. Löwis wrote: I've tried using automake, however I'm worried about libtool not getting the options right while building my module. You should use python-config(1) to obtain the command line options necessary to build and link extension modules. HTH, Martin Sweet, I think

Re: How to instantiate in a lazy way?

2008-12-02 Thread George Sakkis
anyway. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Scanner class

2008-12-02 Thread George Sakkis
On Dec 1, 5:42 pm, Arnaud Delobelle [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED] writes: Is there any stdlib or (more likely) 3rd party module that provides a similar functionality to the java.util.Scanner class [1] ? If not, would there be any interest in porting

Re: Overriding a method at the instance level on a subclass of a builtin type

2008-12-02 Thread George Sakkis
, not the instance, so you're out of luck there. What are you trying to do? Perhaps there is a less magic solution to the general problem. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Mathematica 7 compares to other languages

2008-12-02 Thread George Sakkis
On Dec 2, 4:57 pm, Lew [EMAIL PROTECTED] wrote: There is no reason for you to engage in an /ad hominem/ attack.  It does not speak well of you to resort to deflection when someone expresses a contrary opinion, as you did with both Jon Harrop and with me.  I suggest that your ideas will be

Scanner class

2008-12-01 Thread George Sakkis
Is there any stdlib or (more likely) 3rd party module that provides a similar functionality to the java.util.Scanner class [1] ? If not, would there be any interest in porting it (with a more Pythonic API of course) or are there better alternatives ? George [1] http://java.sun.com/j2se/1.5.0

Re: Great exercise for python expert !

2008-11-28 Thread George Sakkis
): return Add:+j if __name__ == __main__: o = MyObject() s = o.js.kiki(12).kuku() print s HTH, George -- http://mail.python.org/mailman/listinfo/python-list

Re: Great exercise for python expert !

2008-11-28 Thread George Sakkis
On Nov 28, 9:19 am, manatlan [EMAIL PROTECTED] wrote: On 28 nov, 14:58, George Sakkis [EMAIL PROTECTED] wrote: On Nov 28, 5:36 am, manatlan [EMAIL PROTECTED] wrote: I'd like to make a jquery python wrapper ... here is my code

Re: HELP!...Google SketchUp needs a Python API

2008-11-28 Thread George Sakkis
On Nov 28, 4:16 pm, Diez B. Roggisch [EMAIL PROTECTED] wrote: Now, up up and away into my killfilter, Ditto; apparently it's either a troll or an 8-year old. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Applying a decorator to a module

2008-11-27 Thread George Sakkis
mymod = decorator(mymod) George -- http://mail.python.org/mailman/listinfo/python-list

Re: HELP!...Google SketchUp needs a Python API

2008-11-27 Thread George Sakkis
chose the wrong group for your new adopted religion. Why don't you go read a tutorial, write up some code, and come back with any real questions next time. George -- http://mail.python.org/mailman/listinfo/python-list

Re: what's so difficult about namespace?

2008-11-26 Thread George Sakkis
to, say, Scheme lisp, Emacs lisp, PHP? Think before you write. It's exactly the same thing. How would you get all Emacs users in the world to upgrade? The same way you would get all Python users to upgrade to 3.0 ? It's not like Joe User runs emacs to edit his grocery store list. George -- http

Re: end of print = lower productivity ?

2008-11-25 Thread George Sakkis
then ( thenmakes the whole process quite a hassle. :rollseyes: I hope there was a missing smiley in that post.  If a couple extra parens destroys your debugging productivity I suspect you need a fresh approach to the task. Seconded; I thought he's either joking or trolling. George -- http

Re: end of print = lower productivity ?

2008-11-25 Thread George Sakkis
On Nov 25, 5:03 pm, Paul Rubin http://[EMAIL PROTECTED] wrote: [EMAIL PROTECTED] writes: BUT you now can do p = print p(f) All right. Let's talk about that. When I write print, it is both effortless and instantaneous : my hands do not move, a wave goes through my fingers, it all

Re: Instance attributes vs method arguments

2008-11-25 Thread George Sakkis
on the (guessed or measured) performance improvement misses the point of OO design. George -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3 __cmp__ semantic change?

2008-11-23 Thread George Sakkis
or the implementation? According to Guido, the implementation: http://mail.python.org/pipermail/python-ideas/2008-October/002235.html. George -- http://mail.python.org/mailman/listinfo/python-list

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-22 Thread George Sakkis
to it. ..which makes the phrase a reference to an X a more verbose, redundant version of an X since it applies to *every* Python object. You have made your point in the 300+ posts thread, so please quit the terminology trolling in every new thread. George -- http://mail.python.org/mailman/listinfo/python

Re: Need help converting text to csv format

2008-11-21 Thread George Sakkis
On Nov 21, 10:18 am, Chuck Connors [EMAIL PROTECTED] wrote: Any help, pseudo code, or whatever push in the right direction would be most appreciated.  I am a novice Python programmer but I do have a good bit of PHP programming experience. I'm wondering if PHP experience precludes the ability

Re: Dynamic features used

2008-11-21 Thread George Sakkis
effort in writing and reading it is not off-putting (e.g. no C++ template metaprogramming atrocities) George -- http://mail.python.org/mailman/listinfo/python-list

Re: Need help converting text to csv format

2008-11-21 Thread George Sakkis
On Nov 21, 11:05 am, Steve Holden [EMAIL PROTECTED] wrote: George Sakkis wrote: On Nov 21, 10:18 am, Chuck Connors [EMAIL PROTECTED] wrote: Any help, pseudo code, or whatever push in the right direction would be most appreciated.  I am a novice Python programmer but I do have a good bit

Re: Need help converting text to csv format

2008-11-21 Thread George Sakkis
On Nov 21, 2:01 pm, Richard Riley [EMAIL PROTECTED] wrote: George Sakkis [EMAIL PROTECTED] writes: On Nov 21, 11:05 am, Steve Holden [EMAIL PROTECTED] wrote: George Sakkis wrote: On Nov 21, 10:18 am, Chuck Connors [EMAIL PROTECTED] wrote: Any help, pseudo code, or whatever push

Re: initialization in argument definitions

2008-11-21 Thread George Sakkis
Why is this? Thanks, hope its not a stupid quesiton. Sigh.. no it's not stupid at all; actually it is (and will probably remain, unfortunately) the most FAQ of all times: http://www.python.org/doc/faq/general/#why-are-default-values-shared-between-objects George -- http://mail.python.org

Re: matching exactly a 4 digit number in python

2008-11-21 Thread George Sakkis
by the 4 digits to be matched as group #1.. (?:\D|\b)# .. which are followed by non-digit or word boundary ''', re.VERBOSE) HTH, George -- http://mail.python.org/mailman/listinfo/python-list

Re: how to dynamically instantiate an object inheriting from several classes?

2008-11-21 Thread George Sakkis
, cls2, *rest_classes), {}) item = derived_cls(**itemArgs) You will probably want to cache the generated classes so that at most one class is created for each combination of mixins. HTH, George -- http://mail.python.org/mailman/listinfo/python-list

Re: function parameter scope python 2.5.2

2008-11-20 Thread George Sakkis
the class is passed a reference rather than a copy. Why should it be a copy by default ? In Python all copies have to be explicit. George -- http://mail.python.org/mailman/listinfo/python-list

<    1   2   3   4   5   6   7   8   9   10   >