ANNOUNCE: libmsgque 3.4

2009-07-02 Thread Andreas Otto
P.S. sourceforge introduce a new interface yesterday and this has still some bugs ... to get the release 3.4 files you have to use the files link. mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

RE: Specific iterator in one line

2009-06-30 Thread Andreas Tawn
erator in one line > > "Andreas Tawn" writes: > > list("".join([("a","b"*2)[x] for x in [1,0,0,1]]) > > 50 characters. Do I win £5? > > Er, missing right paren. Try: > > list("".join(("a","bb")[x] for x in [1,0,0,1])) > -- Indeed. Stupid paste ;o) -- http://mail.python.org/mailman/listinfo/python-list

RE: Specific iterator in one line

2009-06-30 Thread Andreas Tawn
> > > This is purely sport question. I don't really intend to use the answer > > > in my code, but I am wondering, if such a feat could be done. > > > > > > I have a following problem: I have a list based upon which I would > > > like to construct a different one. I could simply use list > > > comp

RE: Specific iterator in one line

2009-06-30 Thread Andreas Tawn
> > This is purely sport question. I don't really intend to use the answer > > in my code, but I am wondering, if such a feat could be done. > > > > I have a following problem: I have a list based upon which I would > > like to construct a different one. I could simply use list > > comprehensions,

ANNOUNCE: libmsgque 3.3

2009-06-12 Thread Andreas Otto
ated: = -> http://libmsgque.sourceforge.net For a fast introduction use the following URL: -> http://libmsgque.sourceforge.net/features.htm mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: What text editor is everyone using for Python

2009-05-28 Thread Andreas Roehler
Rhodri James wrote: > On Wed, 27 May 2009 16:56:12 +0100, Bruno Desthuilliers > wrote: > >> Rhodri James a écrit : >>> On Tue, 26 May 2009 14:22:29 +0100, Roy Smith wrote: >>> My pet peeve is syntax-aware editors which get things wrong. For example, the version of emacs I'm using

Re: What text editor is everyone using for Python

2009-05-28 Thread Andreas Roehler
Rhodri James wrote: > On Tue, 26 May 2009 14:22:29 +0100, Roy Smith wrote: > >> My pet peeve is syntax-aware editors which get things wrong. For >> example, >> the version of emacs I'm using now doesn't parse this properly: >> >> '''A triple-quoted string. Some editors won't get this right''' >

Re: What text editor is everyone using for Python

2009-05-28 Thread Andreas Roehler
python mode to work for Windows A bug-report would be fine... :) In case you use python-mode.el, please refer to https://launchpad.net/python-mode Thanks Andreas Röhler -- https://code.launchpad.net/s-x-emacs-werkstatt/ > (do most of my work under Linux anyway), but other than that I

Re: print stream behavior

2009-05-27 Thread Andreas Kraemer
On May 27, 10:52 am, Peter Otten <__pete...@web.de> wrote: > This is a longstanding quirk of the CPython implementation. The > PRINT_ITEM_TO opcode triggers a PyFile_WriteObject() call which in turn does > the C equivalent of > > if isinstance(f, file): >    file.write(f, s) > else: >    write = ge

print stream behavior

2009-05-27 Thread Andreas Kraemer
some light on what's happening under the hood (or how to make it work with "print")? Thanks, Andreas Python 2.4.2 (#1, Jan 10 2008, 17:43:47) [GCC 4.1.2 20070115 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "lice

RE: While Statement

2009-05-22 Thread Andreas Tawn
> Im using 2.6 python and when running this > > class progess(): > > def __init__(self, number, total, char): > > percentage = float(number/total*100) > percentage = int(round(percentage)) > char = char * percentage > print char > > progess(1

ANNOUNCE: libmsgque 3.2

2009-05-21 Thread Andreas Otto
wile I'm now able to support python on windows The Web-Site was updated: =    -> http://libmsgque.sourceforge.net   For a fast introduction use the following URL:    -> http://libmsgque.sourceforge.net/features.htm mfg   Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-21 Thread Andreas Otto
Hi, I solved the problem ... thank you for your help mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
Hi, I setup the PYTHONPATH environment variable too does windows use this variable ? mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
was not found or could a found module not be loaded mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-20 Thread Andreas Otto
system-depend -> question: how I get an unique system independent name or just in general how I solve this kind of problem 3. why is no ".pyd" file created ? -> pyd is the extension name supported mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Andreas Otto
MRAB wrote: > Andreas Otto wrote: >> Hi, >> >> I have the following problem using python on windows. >> I crated a binary extension called >> >> pymsgque.dll >> >> on windows. The same extension works fine on UNIX/Linux. >>

PYTHONPATH on Windows XP module load problem

2009-05-19 Thread Andreas Otto
on and the pymsgque extension was done using > Microsoft Visual C++ Express Edition it seems that I missing something mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

RE: Printing a hex character and prefixing it correctly

2009-05-15 Thread Andreas Tawn
> If I have an integer k, for instance; > > k = 32 // BASE 10 > > How do I get print to print it out in HEX and PREFIXED with 0x? What > is the PROPER WAY? > > This does not work: > > print "This is hex 32: ", int(k, 16) > > Xav k = 32 print "This is hex 32: ", hex(k) Cheers, Drea -- ht

ANNOUNCE: libmsgque 3.1

2009-05-12 Thread Andreas Otto
mentation Entire new documentation and examples were added The Web-Site was updated: = -> http://libmsgque.sourceforge.net For a fast introduction use the following URL: -> http://libmsgque.sourceforge.net/features.htm mfg Andreas Otto -- http://mail.pyt

Nimrod programming language

2009-05-09 Thread Andreas Rumpf
Dear Python-users, I invented a new programming language called "Nimrod" that combines Python's readability with C's performance. Please check it out: http://force7.de/nimrod/ Any feedback is appreciated. Regards, Andreas Rumpf _

Re: python setup ?

2009-04-28 Thread Andreas Röhler
environments, learning and lifting from each other, enabling distributions to select and pull for delivering. So far Andreas -- http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/ https://code.launchpad.net/s-x-emacs-werkstatt/ -- http://mail.python.org/mailman/listinfo/python-list

Re: who is calling the base class __new__ method

2009-04-21 Thread Andreas Otto
Hi, found a solution - "PyObject_GC_New" seems not to be *not* the right function to create a new Python object with a base class included - "PyType_GenericNew" is the right one ... but this one is not documented from: http://docs.python.org/3.0/c-api/type.html

who is calling the base class __new__ method

2009-04-21 Thread Andreas Otto
te instances of such subclasses without getting a TypeError.) This I don't understand because the "tp_base" of "MqS" is "Object" and if I call the "Object" tp_new from my new static PyObject * PyMqS_new(PyTypeObject *type, PyObject *args, PyObject

Re: best "void" return of a member function

2009-04-20 Thread Andreas Otto
Propable you can help me with an other problem ... the following code crash with: ==31431== Process terminating with default action of signal 11 (SIGSEGV) ==31431== General Protection Fault ==31431==at 0x4EA5151: PyObject_GenericGetAttr (object.c:982) ==31431==by 0x4EF1FBD: PyEval_EvalF

Re: best "void" return of a member function

2009-04-20 Thread Andreas Otto
Stefan Behnel wrote: > Andreas Otto writes: >> I'm writing a native language binding for a library. >> >> http://libmsgque.sourceforge.net/ >> >> Every native method called by PYTHON have to return >> a PyObject* even if the f

Re: best "void" return of a member function

2009-04-20 Thread Andreas Otto
Andreas Otto wrote: well propable found the answer by my own ... Py_RETURN_NONE should be the best -- http://mail.python.org/mailman/listinfo/python-list

best "void" return of a member function

2009-04-20 Thread Andreas Otto
se NULL is returned in the case of an "error" mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: Question to python C API

2009-04-17 Thread Andreas Otto
Andreas Otto wrote: > alex23 wrote: >> Did you unpack the Cython archive correctly? Is there a Shadow.py in >> your src/Cython-0.11.1/Cython/ folder? > > yes dev1...@linux02:~/ext/x86_64-suse-linux/thread/bin/Cython-0.11.1> ls -al Cython/Shadow.py -rw-r--r-- 1 dev1usr

Re: Question to python C API

2009-04-17 Thread Andreas Otto
alex23 wrote: > On Apr 17, 4:22 pm, Andreas Otto wrote: >> Question 1: Why you wall it "Pyrex" package ? > > From the first paragraph on the Cython site: "Cython is based on the > well-known Pyrex, but supports more cutting edge functionality and > opti

howto submit documentation bugs on python V3 web-site ?

2009-04-16 Thread Andreas Otto
Hi, is an email or something else available ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Question to python C API

2009-04-16 Thread Andreas Otto
but got the following error > cat setup.py from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext setup( cmdclass = {'build_ext': build_ext}, ext_modules = [Extension("pymsgque", ["helloworld.pyx"

looking for a pattern to code logic shared by gui/cli

2009-04-16 Thread Andreas Balogh
thought it'd be to lengthy to have a functioning sample, especially for the gui. -- Andreas Balogh baloand (at) gmail.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Question to python C API

2009-04-16 Thread Andreas Otto
Yes, you are right ... I read more and found the doc about this ... the problem I have is something more tricky ... I allready have an extension written for java and the easyest thing would be use this as template and replace the java specific calls with python calls ... but the pyt

Re: Question to python C API

2009-04-15 Thread Andreas Otto
Hi, I want to make a language binding for an existing C library http://libmsgque.sourceforge.net is this possible ? -- http://mail.python.org/mailman/listinfo/python-list

Question to python C API

2009-04-15 Thread Andreas Otto
quot;O!" for a type object HOWTO put the type into the function from above mfg Andreas Otto -- http://mail.python.org/mailman/listinfo/python-list

Re: Regex similar to "^(?u)\w$", but without digits?

2009-04-12 Thread Andreas Pfrengle
On 12 Apr., 02:31, "Mark Tolonen" wrote: > "Andreas" wrote in message > > news:f953c845-3660-4bb5-8ba7-00b93989c...@b1g2000vbc.googlegroups.com... > > > Hello, > > > I'd like to create a regex that captures any unicode character, but > >

Re: Regex similar to "^(?u)\w$", but without digits?

2009-04-12 Thread Andreas Pfrengle
On 12 Apr., 02:31, "Mark Tolonen" wrote: > "Andreas" wrote in message > > news:f953c845-3660-4bb5-8ba7-00b93989c...@b1g2000vbc.googlegroups.com... > > > Hello, > > > I'd like to create a regex that captures any unicode character, but > >

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

2009-04-11 Thread Andreas Pfrengle
On 11 Apr., 22:14, ergconce...@googlemail.com wrote: > Hi, > I have a list looking like > > [ 0.84971586,  0.05786009,  0.9645675,  0.84971586,  0.05786009, > 0.9645675, 0.84971586,  0.05786009,  0.9645675,  0.84971586, > 0.05786009,  0.9645675] > > and I would like to break this list into subsets

Regex similar to "^(?u)\w$", but without digits?

2009-04-11 Thread Andreas
Hello, I'd like to create a regex that captures any unicode character, but not the underscore and the digits 0-9. "^(?u)\w$" captures them also. Is there a possibility to restrict an expression like "\w" to "\w without [0-9_]"? I'm using python 2

RE: Python to Perl transalators

2009-03-18 Thread Andreas Tawn
> > 2009/3/17 : > >> Could anyone suggest whether there is any Python to Perl code convertors? > >> I found one on the net viz. Perthon. But it wasn't really helping out. > > > I am just a beginner learning both the languages. Wondered if I can have some > comparative understanding of both.

Cannot allocate memory when using os.spawn for moving files

2009-03-17 Thread Andreas
nlp(os.P_NOWAIT, 'mv', 'mv', LOCALFILENAME, REMOTEFILENAME) where LOCALFILENAME is some string like '/home/andreas/model.bin' and REMOTEFILENAME is some string like '/home/nfs/model-output/'. Here I have the problem that after about every 10th model ru

RE: Inverse of dict(zip(x,y))

2009-03-04 Thread Andreas Tawn
>>>So, if x and y are two lists, it is easier to make a dictionary using >>>d = dict(zip(x,y)), but if I have d of the form, d = {x1:y1, >>>x2:y2, ...}, what is there any trick to get lists x = [x1, x2, ...] >>>and y = [y1, y2, ...] >>> >>>Cheers, >>>Chaitanya. >> >> x = d.keys() >> y = d.values()

RE: Inverse of dict(zip(x,y))

2009-03-04 Thread Andreas Tawn
>Can someone suggest a easy method to do the inverse of dict(zip(x,y)) >to get two lists x and y? > >So, if x and y are two lists, it is easier to make a dictionary using >d = dict(zip(x,y)), but if I have d of the form, d = {x1:y1, >x2:y2, ...}, what is there any trick to get lists x = [x1, x2, ..

Re: Will multithreading make python less popular?

2009-02-16 Thread Andreas Kaiser
o even though they're using separate OS threads, and even though different Ruby threads might run on different cores, the speed of your program (at least the Ruby part) is limited to the speed of a single core. - Please don't mix threads and parallel processing on more then one CPU co

Re: len()

2009-02-08 Thread Andreas Waldenburger
On Sun, 08 Feb 2009 07:54:13 -0500 Pat wrote: > Terry Reedy wrote: > > Pat wrote: > >> Andreas Waldenburger wrote: > >>> On Sat, 31 Jan 2009 13:27:02 -0500 Pat wrote: > >>> > >>>> Tobiah wrote: > >>>>> Just out of c

Re: "Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Andreas Waldenburger
On Sun, 08 Feb 2009 01:28:00 +1100 Steven D'Aprano wrote: > Andreas Waldenburger wrote: > > > It seems that there is a for...else construct. Replacing the inner > > if with pass seems to confirm this. The else clause is still > > executed. > > Yes, there i

Re: "Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Andreas Waldenburger
On Sat, 7 Feb 2009 15:21:22 +0100 Andreas Waldenburger wrote: > outer if > For if > For if > Phantom else > Geez, I'm a moron. This is obviously not the output from the snippet. But if you fix the capitalization, it is. Sorry for that. /W -- My real email address is con

"Weird" Indentation? (Or: is there a for...else construct?)

2009-02-07 Thread Andreas Waldenburger
I've found something in the spirit of the following (in the epydoc sources, if you care): if True: print "outer if" for t in range(2): if True: print "for if" else: print "phantom else" For the life of me I can't place the "else". Which if clause does it be

RE: python 3 error i know the file works in python 2.6

2009-02-05 Thread Andreas Tawn
>#open file and read last names >filename = input('name file') >file = open(filename, 'r') >names_list = file.readlines() >file.close() >#open a file for saving passwords >outfile_name = input('Save passwords') >outfile = open(outfile_name, 'a') > > >#create a password for each name in list >import

Re: is python Object oriented??

2009-01-31 Thread Andreas Waldenburger
On Sat, 31 Jan 2009 09:11:03 +0100 Laszlo Nagy wrote: > Python is not a pure object oriented language, because it has other > programming tools, for example functions. I'm not sure about the first part of the sentence, but Python's functions are objects. Check it in the interpreter: attributes,

Re: len()

2009-01-31 Thread Andreas Waldenburger
On Sat, 31 Jan 2009 13:27:02 -0500 Pat wrote: > Tobiah wrote: > > Just out of curiosity, why was len() made to > > be it's own function? I often find myself > > typing things like my_list.len before I > > catch myself. > > > > Thanks, > > > > Toby > > I'm surprised that no one responded to th

RE: is there a shorter way to write this

2009-01-29 Thread Andreas Tawn
> I had a task in a book to pick 5 items from a list of 26 ensuring the items are not repeated > > > import random > list = ['a','b','c','d','e','f','g','h','i','j','k','l','m', >'n','o','p','q','r','s','t','u','v','w','x','y','z'] > word = ' ' > a = random.choice(list) > list.remove(a) > b

Re: Newby: how to transform text into lines of text

2009-01-26 Thread Andreas Waldenburger
On 26 Jan 2009 22:12:43 GMT Marc 'BlackJack' Rintsch wrote: > On Mon, 26 Jan 2009 16:10:11 +0100, Andreas Waldenburger wrote: > > > On 26 Jan 2009 14:51:33 GMT Marc 'BlackJack' Rintsch > > wrote: > > > >> On Mon, 26 Jan 2009 12:22:

Re: Method returning an Iterable Object

2009-01-26 Thread Andreas Waldenburger
On Tue, 27 Jan 2009 00:05:53 +0530 Anjanesh Lekshminarayanan wrote: > > You can also replace the whole class with a function thusly: > > > >def two_times(n): > >for k in itertools.count(1): > >yield n * (2**k) > > > > This function is then called a generator (because it ge

Re: Method returning an Iterable Object

2009-01-26 Thread Andreas Waldenburger
On Mon, 26 Jan 2009 22:01:21 +0530 Anjanesh Lekshminarayanan wrote: > Is there a way to return an iterable object ? > > class twoTimes: > def __init__(self, n): > self.__n = n > > def getNext(): > self.__n *= 2 > return self.__n > > Rename getNext() to next() a

Re: Newby: how to transform text into lines of text

2009-01-26 Thread Andreas Waldenburger
On 26 Jan 2009 14:51:33 GMT Marc 'BlackJack' Rintsch wrote: > On Mon, 26 Jan 2009 12:22:18 +, Sion Arrowsmith wrote: > > > content = a.readlines() > > > > (Just because we can now write "for line in file" doesn't mean that > > readlines() is *totally* redundant.) > > But ``content = list(a

Re: Counting number of objects

2009-01-26 Thread Andreas Waldenburger
On Mon, 26 Jan 2009 02:37:37 + Mark Wooding wrote: > > This looks OK, although I'd suggest using "cls.counter += 1" instead > > of "a.counter += 1" in the __new__() method. Just seems clearer to > > me, esp. when you think about subclassing. > > I'm not sure about clarity, but that would be

Re: I'm a python addict !

2009-01-25 Thread Andreas Waldenburger
On Sat, 24 Jan 2009 23:53:17 + MRAB wrote: > Terry Reedy wrote: > > For a Python 'program', see http://xkcd.com/534/ > > > It doesn't follow PEP 8! So Randall can just forget about getting xkcd in the Standard Library. Let this be an example to all of you­! /W -- My real email address is

Re: v = json.loads("{'test':'test'}")

2009-01-25 Thread Andreas Waldenburger
On Sun, 25 Jan 2009 19:04:44 -0500 Steve Holden wrote: > Andreas Waldenburger wrote: > > On Sun, 25 Jan 2009 23:51:41 +0100 "Diez B. Roggisch" > > wrote: > > > >> gert schrieb: > >>> {'test': 'test'} > >>>

Re: v = json.loads("{'test':'test'}")

2009-01-25 Thread Andreas Waldenburger
On Sun, 25 Jan 2009 23:51:41 +0100 "Diez B. Roggisch" wrote: > gert schrieb: > > {'test': 'test'} > > {"test": "test"} > > > > It can not be that hard to support both notation can it ? > > It's not hard, but it's not standard-conform. > OK, playing the devil's advocate here: Doesn't practicali

Re: Counting number of objects

2009-01-25 Thread Andreas Waldenburger
On Sun, 25 Jan 2009 09:23:35 -0800 (PST) Kottiyath wrote: > Hi, > I am creating a class called people - subclasses men, women, children > etc. > I want to count the number of people at any time. > So, I created code like the following: > > class a(object): > counter = 0 > def __new__(cls

Re: Noob question: Is all this typecasting normal?

2009-01-02 Thread Andreas Waldenburger
On Fri, 2 Jan 2009 16:44:11 -0800 (PST) r wrote: > On Jan 2, 6:26 pm, Andreas Waldenburger wrote: > > On Fri, 2 Jan 2009 16:16:10 -0800 (PST) vk wrote: > > > > > > If there were, I would expect it to conform with PEP 8 (get > > > > those ugly camelCase

Re: Noob question: Is all this typecasting normal?

2009-01-02 Thread Andreas Waldenburger
On Fri, 2 Jan 2009 16:16:10 -0800 (PST) vk wrote: > > If there were, I would expect it to conform with PEP 8 (get those > > ugly camelCase names outta there :-) > > haha, please forgive me. > I'll try and think of some more creative names. FYI: The names themselves aren't he problem at all. T

Re: Noob question: Is all this typecasting normal?

2009-01-02 Thread Andreas Waldenburger
On Fri, 2 Jan 2009 14:36:04 -0800 (PST) vk wrote: > There needs to be a "user_io" or "sanitize" module in the standard > library to take care of this stuff. > [snip example] > Great idea! +1 > ... but there isn't, as far as I know. Well, get to it, then. ;) /W -- My real email address is co

Re: Is there a better algorithm?

2009-01-02 Thread Andreas Waldenburger
On Fri, 02 Jan 2009 19:55:43 +0100 Markus Brueckner wrote: > g = ( ((e[0],None,e[1]) if len(e)==2 else (e[0],e[1],e[2])) for e in > L) If this isn't proof of Python's versatility, I don't know what is. In one line it can mimic both Lisp and Perl. Sweet. :) /W -- My real email address is const

Re: Why not Ruby?

2009-01-02 Thread Andreas Waldenburger
On 02 Jan 2009 12:45:36 GMT Steven D'Aprano wrote: > You've just earned a plonking for the next month. Do try to have at > least half a clue by February. I will state again that there seems to have been a slight change of tone in clp lately. How about we Python guys work a bit harder on not cal

Re: Python is slow

2008-12-14 Thread Andreas Kostyrka
ssible in competitive speeds. But you sometime need a developer that can wield the tool with a certain experience, and not a stupid rookie that whines that his tool does not make his O(n**n) algorithm automatically blazing fast. Andreas > > > By the way... I know of a very slow Python

Re: execution time

2008-12-14 Thread Andreas Kostyrka
bucket2.sort(data) > > How to write a test script which will outputs execution time for > bucket2.sort(data) ? Well: import time starttime = time.time() endtime = time.time() print "Whatever does, it took %5.3fs to do." % (endtime - starttime) Alternativly take a

Re: Python is slow

2008-12-12 Thread Andreas Kostyrka
ey'll do. There have flown quite a bit of Python version since the time that it was announced that Parrot will have a Python frontend. Andreas -- http://mail.python.org/mailman/listinfo/python-list

Re: Is 3.0 worth breaking backward compatibility?

2008-12-11 Thread Andreas Waldenburger
On Thu, 11 Dec 2008 10:21:55 -0800 (PST) walterbyrd wrote: > On Dec 7, 12:35 pm, Andreas Waldenburger wrote: > > > Plze. Python 3 is shipping now, and so is 2.x, where x > 5. > > Python 2 is going to be around for quite some time. What is > > everybody's pro

Re: Mathematica 7 compares to other languages

2008-12-11 Thread Andreas Waldenburger
On Thu, 11 Dec 2008 05:40:45 + Paul Rudin <[EMAIL PROTECTED]> wrote: > "Dotan Cohen" <[EMAIL PROTECTED]> writes: > > > 2008/12/10 <[EMAIL PROTECTED]>: > >> Ruby: > >> > >> def norm a > >> s = Math.sqrt(a.map{|x|x*x}.inject{|x,y|x+y}) > >> a.map{|x| x/s} > >> end > > > > If someone doesn't

Re: looking up function's doc in emacs

2008-12-11 Thread Andreas Röhler
Xah Lee wrote: > in programing elisp in emacs, i can press “Ctrl+h f” to lookup the doc > for the function under cursor. > > is there such facility when coding in perl, python, php? > > (i'm interested in particular python. In perl, i can work around with > “perldoc -f functionName”, and in php

Re: Guido's new method definition idea

2008-12-07 Thread Andreas Waldenburger
On Sun, 07 Dec 2008 20:56:40 GMT I V <[EMAIL PROTECTED]> wrote: > So, if we want Python to the programming language of choice for > Lacanian psychoanalysts, perhaps we should adopt the symbol "$" (or > even, with Python 3's support for unicode identifiers, S followed by > U+0388) instead of "self."

Re: Python for kids?

2008-12-07 Thread Andreas Waldenburger
On Sun, 7 Dec 2008 12:13:37 -0800 (PST) "Russ P." <[EMAIL PROTECTED]> wrote: > I have a 12-year-old son who spends too much time playing Xbox live > and watching silly YouTube videos. I would like to try to get him > interested in programming. Is anyone aware of a good book or website > that addre

[OT] [sort of] Malcom Reynolds?

2008-12-07 Thread Andreas Waldenburger
Just found this in the re module's docs: m = re.match(r"(?P\w+) (?P\w+)", "Malcom Reynolds") Does this represent an attempt to phase out the gratuitous Monty Python references in favor of gratuitous Firefly references? Because if so, I'm all for it. Anyways, stuff like that really makes

Re: Importing the re module fails

2008-12-07 Thread Andreas Waldenburger
On Sun, 07 Dec 2008 20:36:58 +0100 "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > Andreas Waldenburger schrieb: > > This is a little puzzling. > > > > > > Using ipython: > > > > [EMAIL PROTECTED] Logstuff]$ ipython > > P

Re: Is 3.0 worth breaking backward compatibility?

2008-12-07 Thread Andreas Waldenburger
On Sun, 7 Dec 2008 20:35:53 +0100 Andreas Waldenburger <[EMAIL PROTECTED]> wrote: > On Sun, 7 Dec 2008 11:22:23 -0800 (PST) walterbyrd > <[EMAIL PROTECTED]> wrote: > > > At best, I am a casual python user, so it's likely that I am missing > > something. >

Re: Is 3.0 worth breaking backward compatibility?

2008-12-07 Thread Andreas Waldenburger
On Sun, 7 Dec 2008 11:22:23 -0800 (PST) walterbyrd <[EMAIL PROTECTED]> wrote: > IMO: breaking backward compatibility is a big deal, and should only be > done when it is seriously needed. > Plze. Python 3 is shipping now, and so is 2.x, where x > 5. Python 2 is going to be around for quite som

Importing the re module fails

2008-12-07 Thread Andreas Waldenburger
This is a little puzzling. Using ipython: [EMAIL PROTECTED] Logstuff]$ ipython Python 2.5.2 (r252:60911, Sep 30 2008, 15:41:38) Type "copyright", "credits" or "license" for more information. [snip ipython help message] In [1]: import re This works fine. But with the

Re: Guido's new method definition idea

2008-12-07 Thread Andreas Waldenburger
On Sun, 07 Dec 2008 19:13:18 +0100 Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > > and friendlier to newbies. > > I'd rather say "more acceptable to java-brainwashed developpers". Why would you rather be unfriendly and seed ambivalence? I do see the fun in a little Python snobbism, but ... c

Re: Guido's new method definition idea

2008-12-07 Thread Andreas Waldenburger
On Sat, 6 Dec 2008 23:21:04 -0800 (PST) Lie <[EMAIL PROTECTED]> wrote: > I think we have to test this on newbies. [snip] > Now that's talking like a programmer! Ideas on how such a survey could be conducted? Anyone? > If this dead horse is revived because of that reason, then I'd go with > cha

Re: Guido's new method definition idea

2008-12-07 Thread Andreas Waldenburger
On Sun, 07 Dec 2008 02:49:27 -0500 acerimusdux <[EMAIL PROTECTED]> wrote: > I'm not sure though whether allowing both syntaxes would make things > more or less confusing. It might actually be helpful in some respects > for newcomers to realize that self.method(arg) is somewhat the same > as meth

Re: Guido's new method definition idea

2008-12-06 Thread Andreas Waldenburger
On Sat, 6 Dec 2008 14:39:34 -0800 (PST) "Russ P." <[EMAIL PROTECTED]> wrote: > I don't know much about Perl, but my understanding is that a dollar > sign must be used every time a variable is dereferenced, as in bash or > other shell languages. What we are proposing here is something > entirely di

Re: Guido's new method definition idea

2008-12-06 Thread Andreas Waldenburger
On Sat, 6 Dec 2008 13:32:58 +0100 Andreas Waldenburger <[EMAIL PROTECTED]> wrote: > On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] > suggested: > > > > class C: > > def $method(arg): > > $value = arg > > > > [snip]

Re: Guido's new method definition idea

2008-12-06 Thread Andreas Waldenburger
On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote: > class C: > def $method(arg): > $value = arg > > (Note there's no point after $, it's not currently possible). > Ruby uses @ and @@ for similar purposes. > I agree that the code looks worse, but also shorter to read an

Re: Guido's new method definition idea

2008-12-06 Thread Andreas Waldenburger
On 6 Dec 2008 09:18:20 GMT Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > On Sat, 06 Dec 2008 09:56:12 +0100, Antoine De Groote wrote: > > [snip reference to "preferably only one way to do it"] > > The reason why I'm against that change too. It adds a second, > alternative way to expres

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

2008-12-06 Thread Andreas Waldenburger
On Sat, 06 Dec 2008 20:28:17 +1300 Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: > Does that make any sense to you, or should I start drawing simple > diagrams? People, please! Is some civility too much to ask? /W -- My real email address is constructed by swapping the domain with the recipie

Re: RELEASED Python 3.0 final

2008-12-05 Thread Andreas Waldenburger
On Fri, 5 Dec 2008 12:16:47 -0800 (PST) "Fernando H. Sanches" <[EMAIL PROTECTED]> wrote: > On Dec 4, 5:45 pm, Andreas Waldenburger <[EMAIL PROTECTED]> wrote: > > On Thu, 4 Dec 2008 11:52:38 -0600 [EMAIL PROTECTED] wrote: > > [snip] > > Whenever has it

Whitespace in Python (3) [was: RELEASED Python 3.0 final]

2008-12-05 Thread Andreas Waldenburger
On Fri, 5 Dec 2008 07:46:02 -0800 (PST) [EMAIL PROTECTED] wrote: > Andreas Waldenburger: > > My point is: If you mix tabs and spaces in a way that breaks code, > > you'll find out pretty easily, because your program will not work. > > - Most newbies don't know tha

Re: To Troll or Not To Troll (aka: "as" keyword woes)

2008-12-05 Thread Andreas Waldenburger
On Thu, 4 Dec 2008 16:17:20 -0800 "Warren DeLano" <[EMAIL PROTECTED]> wrote: > Thank so much for the suggestions Ben. Sorry that I am personally > unable to live up to your high standards, but it is nevertheless an > honor to partipicate in such a helpful and mutually respectful > community maili

Re: RELEASED Python 3.0 final

2008-12-05 Thread Andreas Waldenburger
On Thu, 4 Dec 2008 15:49:46 -0600 [EMAIL PROTECTED] wrote: > > Andreas> Whenever has it been a pythonic ideal to "not allow" > Andreas> stuff? You get warnings. Everything else is up to you. > > It's more than warnings. With properly crafted combi

Re: "as" keyword woes

2008-12-05 Thread Andreas Waldenburger
On 04 Dec 2008 22:29:41 GMT Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Thank goodness we don't have to program in verbose, explicit English! Then you'll HATE Inform 7: http://en.wikipedia.org/wiki/Inform_7#Example_game_2 :) /W -- My real email address is constructed by swapping the domain wi

Re: RELEASED Python 3.0 final

2008-12-04 Thread Andreas Waldenburger
On Thu, 4 Dec 2008 11:52:38 -0600 [EMAIL PROTECTED] wrote: > > >>> As you have probably guessed: nothing changed here. > >>> Also see:http://www.python.org/dev/peps/pep-0666/ > >> > >> What? Do you mean it's possible to mix tabs and spaces still? > >> Why? > > Daniel> Wh

Re: RELEASED Python 3.0 final

2008-12-04 Thread Andreas Waldenburger
On Thu, 4 Dec 2008 09:30:52 -0800 "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > >> As you have probably guessed: nothing changed here. > >> Also see:http://www.python.org/dev/peps/pep-0666/ > > > > What? Do you mean it's possible to mix tabs and spaces still? Why? > > Why not? > +1 -- My r

Re: "as" keyword woes

2008-12-04 Thread Andreas Waldenburger
On Thu, 4 Dec 2008 10:44:33 -0600 "Chris Mellon" <[EMAIL PROTECTED]> wrote: > Aside from the cultural indoctrination, though (and that may be a real > and strong force when dealing with math software, and I don't want to > discount it in general, just for purposes of this discussion) why is > it m

Re: Please fix your clock [was Re: Multiple equates]

2008-12-04 Thread Andreas Waldenburger
On Thu, 4 Dec 2008 06:40:02 +0200 "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Andreas Waldenburger" <[EMAIL PROTECTED]> > > > On 04 Dec 2008 15:53:21 GMT Steven D'Aprano > > <[EMAIL PROTECTED]> wrote: > > > > >

Re: Please fix your clock [was Re: Multiple equates]

2008-12-04 Thread Andreas Waldenburger
On 04 Dec 2008 15:53:21 GMT Steven D'Aprano <[EMAIL PROTECTED]> wrote: > Hendrik, I think your PC's clock is wrong. You seem to be posting > from the future. So? Maybe he is. What's your problem? /W -- My real email address is constructed by swapping the domain with the recipient (local part)

Re: Mathematica 7 compares to other languages

2008-12-04 Thread Andreas Waldenburger
On Wed, 03 Dec 2008 20:38:44 -0500 Lew <[EMAIL PROTECTED]> wrote: > Xah Lee wrote: > > enough babble ... > > Good point. Plonk. Guun dun! > I vaguely remember you plonking the guy before. Did you unplonk him in the meantime? Or was that just a figure of speech? teasingly yours, /W -- My r

Re: Reverse zip() ?

2008-12-03 Thread Andreas Waldenburger
On Wed, 3 Dec 2008 07:08:52 -0800 (PST) Janto Dreijer <[EMAIL PROTECTED]> wrote: > I'd like to point out that since your where thinking in terms of > matplotlib, you might actually find numpy's own transpose useful, > instead of using zip(*seq) :) > This was, of course, to be expected. :) Whenev

<    1   2   3   4   5   6   7   >