Re: Optional Static Typing

2004-12-26 Thread Robert Kern
Luis M. Gonzalez wrote: Robert Kern wrote: Automatic type inferencing is great, but sometimes the inference is "object". Being able to supply more information about types helps Starkiller keep the inferences tight and specific. Hmm... I'm not an expert in this subject at all, b

Re: Optional Static Typing

2004-12-27 Thread Robert Kern
Luis M. Gonzalez wrote: Robert Kern wrote: Starkiller, at least, can deal with cases where a variable might be one of a set of types and generates code for each of this set. Explicit type declarations can help keep these sets small and reduces the number of times that Starkiller needs to fall

Re: what would you like to see in a 2nd edition Nutshell?

2004-12-29 Thread Robert Kern
r libraries, etc.). I think that the core lessons such a person is going to learn from a numarray section of your book will transfer just fine to Numeric if they are careful. If they're not careful, a book isn't going to keep them from shooting themselves in the foot, anyways.

Re: missing? dictionary methods

2005-03-21 Thread Robert Kern
else: dct[key] = value def make(dct, key, value): if key in dct: raise KeyError('%r already in dict' % key) else: dct[key] = value I don't see a good reason to make these built in to dict type. -- Robert Kern [EMAIL PROTECTED] "In the fields of he

Re: missing? dictionary methods

2005-03-21 Thread Robert Kern
down to how often such constructs are used. I don't think that I've ever run into use cases for safeset() and make(). dct.get(key, default) comes up *a lot*, and in places where speed can matter. Searching through the standard library can give you an idea how often. -- Robert Kern [EMAIL

Re: Begniner Question

2005-03-21 Thread Robert Kern
t;) if int(choice)==1: print "Here" else: pass if int(choice)==2: else: pass You need something between the if: and the else: lines. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: recursive method not reaching base case

2005-03-23 Thread Robert Kern
rval() keeps getting called over and over again with self.reps == 3. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython 0.7 released!

2005-03-24 Thread Robert Kern
February so was looking for some recent back and forth. Jim has a predilection towards keeping mum for a while so he can make big announcements at his conference talks. Once you know that about his character, the rest falls into place. -- Robert Kern [EMAIL PROTECTED] "In the fields of

Re: newbie help

2005-03-24 Thread Robert Kern
smart-questions.html Please do yourself and us a favor: take a break from the newsgroup for a while, and spend some quality time with the documentation. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die.&quo

Re: Version Number Comparison Function

2005-03-25 Thread Robert Kern
lass or a string (which will be parsed to an instance of the same class, thus must follow the same rules) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Version Number Comparison Function

2005-03-25 Thread Robert Kern
tutils seems like it would be the most generic and supported way to compare version numbers. Indeed. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Grouping code by indentation - feature or ******?

2005-03-25 Thread Robert Kern
e ABC, which Guido worked on before developing Python and also used indentation for grouping, it was found that the colon improved readability. I don't know what those studies said about the frequency of people forgetting to put in the colon. Anecdotally, I can say that I do it very rarely.

Re: str vs dict API size (was 'Re: left padding zeroes on a string...')

2005-03-25 Thread Robert Kern
and plenty of good reasons for them to be more restrictive now. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python List Issue

2005-03-27 Thread Robert Kern
ferenced when you do bob[:]. This is expected. See copy.deepcopy(). It will make sure that everything gets copied and nothing just referenced (more or less). http://docs.python.org/lib/module-copy.html -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are

Re: list-comprehension and map question (simple)

2005-03-28 Thread Robert Kern
itertools [x+y for x,y in itertools.izip(xs, ys)] -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Numarray newbie question

2005-03-28 Thread Robert Kern
u:81/scipy_base/vectorize/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Numarray newbie question

2005-03-29 Thread Robert Kern
ChinStrap wrote: Are there no windows binaries for SciPy for python 2.4 yet? I try to run the installer and it complains that it can't find python 2.3. No, not yet. Besides that, vectorize is exactly what i want. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass

Re: Ternary Operator in Python

2005-04-01 Thread Robert Kern
(0.0 < a) < 1.0) < b ) < 2.0 Go on. Try it with a bunch of different values. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Question about the Python Cookbook: How much of this is new?

2005-04-03 Thread Robert Kern
ially more currently relevant recipes and information in roughtly the same amount of space. Trent """ So yeah, buy it. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: distutils

2005-04-04 Thread Robert Kern
lled Any advice ? I assume that you are on Linux or FreeBSD or somesuch. Install the Python development package for your system. It usually has a name like python-dev or python-devel. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of d

Re: Question about Enthought python distribution

2005-04-04 Thread Robert Kern
ase a 2.4-based version for some time. They use this distribution as the base for the software they write for their clients, and they don't have current intentions to develop against 2.4 quite yet. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Ar

Re: Status of Chaco?

2005-04-04 Thread Robert Kern
anonymous read-access. You can ask Eric Jones for the address. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python modules for image / map manipulation?

2005-04-04 Thread Robert Kern
at contains a binding for the PROJ.4 library, but I haven't gotten it to work on my Mac. http://matplotlib.sourceforge.net/toolkits.html http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=142792 -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where th

Re: Python modules for image / map manipulation?

2005-04-04 Thread Robert Kern
Robert Kern wrote: I use PROJ.4 via pipes for cartographic projections. http://proj.maptools.org/ There is an addon to the matplotlib plotting library that contains a binding for the PROJ.4 library, but I haven't gotten it to work on my Mac. http://matplotlib.sourceforge.net/toolkits

Re: numarray.array can be VERY slow

2005-04-10 Thread Robert Kern
col. So you might as well have used list of lists of lists of lists. See the function setArrayFromSequence in libnumarraymodule.c . If you wish to fix this behavior, I'm sure that a patch would be welcomed. Further questions should probably go to the numarray mailing list. -- Robert Kern [E

Re: Thoughts on some stdlib modules

2005-04-10 Thread Robert Kern
load.enthought.com/MacEnthon/ReadMe.html http://download.enthought.com/MacEnthon/MacEnthon-0.1.dmg Linux: TBA -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on some stdlib modules

2005-04-10 Thread Robert Kern
ge management on the platforms that you care about, it doesn't matter what is or isn't in the standard distribution. Hopefully, one of the CPyAN dreams will actually pan out. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the g

Re: Thoughts on some stdlib modules

2005-04-11 Thread Robert Kern
Fredrik Lundh wrote: Robert Kern wrote: (the Linux distributors know how to do this: look for good stuff that's either actively maintained or simple and solid enough to live for a while, make sure the licenses are good enough, bundle the latest and greatest version, ship tested versio

Re: where is python.h? / NumPy installation

2005-04-11 Thread Robert Kern
you can snag a pre-built Numeric from http://pythonmac.org/packages/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Thoughts on some stdlib modules

2005-04-11 Thread Robert Kern
s a distribution of the Python interpreter and a number of packages. Currently, MacEnthon is just a collection of packages because I can rely on the presence of Python 2.3.0 on all OSX 10.3 machines. In the future, I will be releasing a version for 2.4.x and that will include the interpreter. -- Rob

Re: Thoughts on some stdlib modules

2005-04-11 Thread Robert Kern
Fredrik Lundh wrote: Robert Kern wrote: Agreed, which is why I think that proper package management and a CPyAN-type system is the way to go, not trying to stuff everything into a single distribution. I think we're looking at this in two different ways: you're looking at it from

Re: help: loading binary image data into memory

2005-04-11 Thread Robert Kern
retrbinary("get ???", img.write) ? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python license (2.3)

2005-04-12 Thread Robert Kern
does not say so anywhere in the license text. Yes, you can GPL the derived work. The licenses are compatible. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailma

Re: chaco and wx 2.5....

2005-04-12 Thread Robert Kern
Fabio Pliger wrote: anyone know if it's possibile to run chaco with wx 2.5.3 or grater? No, not at this time. Enthought expects that they will have some "conversion days" around summertime to move their codebase to the soon-to-be-released wxPython 2.6. -- Robert Kern [EMAIL PRO

Re: Python license (2.3)

2005-04-12 Thread Robert Kern
Antoon Pardon wrote: Op 2005-04-12, Robert Kern schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: What licence can I use? Somewhere they say you can combine python code with GPL code. Does that mean that the resulting code has to have both the GPL license as the PSF license, as both seem t

Re: Python license (2.3)

2005-04-13 Thread Robert Kern
Antoon Pardon wrote: Op 2005-04-13, Robert Kern schreef <[EMAIL PROTECTED]>: Yes, the license text and the copyright notice must be attached. It doesn't mean that the PSF license is the operative one for the derivative work. Why attach a license that is not operative. That doesn&#

Re: Python license (2.3)

2005-04-13 Thread Robert Kern
Antoon Pardon wrote: Op 2005-04-13, Robert Kern schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: Op 2005-04-13, Robert Kern schreef <[EMAIL PROTECTED]>: Yes, the license text and the copyright notice must be attached. It doesn't mean that the PSF license is the operative one fo

Re: numarray.array can be VERY slow

2005-04-13 Thread Robert Kern
rays, he was appending to lists (each only 8 items long, so there really is no significant overhead). See my response in this thread for the answer. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richa

Re: Python license (2.3)

2005-04-14 Thread Robert Kern
Antoon Pardon wrote: Op 2005-04-13, Robert Kern schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: Well if it comes so far I have to consult a lawyer I'd rather not publish it in the first place. Then take the (free) advice that you asked for. I'll do that and I appreciate your t

Re: Python license (2.3)

2005-04-14 Thread Robert Kern
Antoon Pardon wrote: Op 2005-04-14, Robert Kern schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: Op 2005-04-13, Robert Kern schreef <[EMAIL PROTECTED]>: I would do that if I were just writing code I thought others could find usefull. I then would feel no problem "burdening"

Re: Python license (2.3)

2005-04-14 Thread Robert Kern
Antoon Pardon wrote: Op 2005-04-14, Robert Kern schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: Op 2005-04-14, Robert Kern schreef <[EMAIL PROTECTED]>: Antoon Pardon wrote: Op 2005-04-13, Robert Kern schreef <[EMAIL PROTECTED]>: I would do that if I were just writing cod

Re: new to mac OS10

2005-04-15 Thread Robert Kern
ary/Framework/Python.framwork -bash: cd: /System/Library/Framework/Python.framwork: No such file or directory ~ $ You misspelt the framework path in both cases. Blasphemy:~ kern$ ls /System/Library/Frameworks/Python.framework/ Headers Python Resources Versions -- Robert Kern [EMAIL PROTECTED] &qu

Re: new to mac OS10

2005-04-16 Thread Robert Kern
not a precise replacement of Apple-installed Python... Bingo. It's not intended to be one. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: new to mac OS10

2005-04-17 Thread Robert Kern
Maurice LING wrote: Robert Kern wrote: 3. Apple-installed Python's command line tools are symlinked from /usr/bin to /System/Library/Frameworks/Python.framework but the OSX installer for Python 2.4.1 places the commandline tools in /usr/local/bin and symlinked to /Library/Frame

Re: python.exe on Mac OS X!?

2005-04-17 Thread Robert Kern
acPython-OSX-2.4.1-1.dmg -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: python.exe on Mac OS X!?

2005-04-17 Thread Robert Kern
ns of Python on this machine, and as far as I can tell the binary installer overwrites the default installed version. I could be wrong. You are wrong. It installs alongside. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to

Re: Can't compile with --enable-shared on MacOSX

2005-04-18 Thread Robert Kern
nto the app bundle when you build it. I think you do want frameworks. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal: an unchanging URL for Python documentation

2005-04-19 Thread Robert Kern
didn't (and was posting to propose that it should exist and behave as it actually does). -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: goto statement

2005-04-20 Thread Robert Kern
e (and then uncomment ), what are you doing then? Use comments? -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Troll? was: Re: goto statement

2005-04-20 Thread Robert Kern
ometimes usefull. No, because you said that it was useful for obfuscating code. Obfuscating code is generally not a desirable feature of a language construct. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die.&quo

Re: goto statement

2005-04-20 Thread Robert Kern
Matt Feinstein wrote: On Wed, 20 Apr 2005 10:23:58 +0100 (BST), praba kar <[EMAIL PROTECTED]> wrote: Dear All, In Python what is equivalent to goto statement I'd like to that implemented in an interpreted language. Requires some time travel. Yes, to 2004-04-01. -- Robert Kern [EMAI

Re: Why Python does *SLICING* the way it does??

2005-04-21 Thread Robert Kern
20)" and get a 3-based array (I may have the syntax slightly wrong by now). It was useful and took care of this problem. There's nothing that stops you from writing a class that does this. I believe someone posted such a one to this thread. I have yet to see a concrete proposal on how to ma

Re: regarding system function

2005-04-21 Thread Robert Kern
failure). Are you sure about that? In [3]:os.system('cat foo') cat: foo: No such file or directory Out[3]:256 -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.

Re: regarding system function

2005-04-22 Thread Robert Kern
switch for rm. In [4]:os.system('rm -r foo') rm: foo: No such file or directory Out[4]:256 In [5]:os.system('rm -rf foo') Out[5]:0 -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -

Re: Python licence again

2005-04-22 Thread Robert Kern
John Machin wrote: On Fri, 22 Apr 2005 17:26:19 -0700, Robert Kern <[EMAIL PROTECTED]> wrote: While you can, sort of, and people have already pointed out the appropriate web page to you, I ask that you *don't* use the PSF License. The PSF License uses proper nouns that you will have

Re: Python licence again

2005-04-22 Thread Robert Kern
l or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation." You are neither the PSF nor is your software "Python". -- Robert Kern [EMAIL PROTECTED] "In the fields of hell wher

Re: Variables

2005-04-23 Thread Robert Kern
some other language. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Variables

2005-04-23 Thread Robert Kern
k him what "domain" means in mathematics. And check his answer[1]. While one could argue that using the term "variable" for Python names is incorrect for good programming reasons, your friend's reasoning is ridiculous. [1] http://mathworld.wolfram.com/Domain.html -- Ro

Re: Variables

2005-04-23 Thread Robert Kern
. If you must, http://en.wikipedia.org/wiki/Variable -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Variables

2005-04-23 Thread Robert Kern
Richard Blackwood wrote: Robert Kern wrote: If you must, http://en.wikipedia.org/wiki/Variable Fantastic, wikipedia deals precisely with the difference between variables in mathematics versus programming. However, he would never trust a definition from such an "unreputable" source. I

Re: Variables

2005-04-23 Thread Robert Kern
Richard Blackwood wrote: Bengt Richter wrote: On Sat, 23 Apr 2005 22:45:14 -0400, Richard Blackwood <[EMAIL PROTECTED]> wrote: Robert Kern wrote: Richard Blackwood wrote: To All: Folks, I need your help. I have a friend who claims that if I write: foo = 5 then foo is

Re: Variables

2005-04-24 Thread Robert Kern
Mike Meyer wrote: Robert Kern <[EMAIL PROTECTED]> writes: Could I honestly argue this to him? From what basis do I argue that it is not an equation? It's his responsibility to show that it *is* an equation. x = x + 1 Equation? I think not. I think it is. One equation in one unknown. T

Re: bytecode non-backcompatibility

2005-04-24 Thread Robert Kern
y libraries which can be quite a bit of work... I do hope this problem will be sorted out some day. This problem is mitigated somewhat by the fact that the devs keep binary compatibility within a major revision series (e.g. 2.3.0, 2.3.1, 2.3.2, ...). -- Robert Kern [EMAIL PROTECTED] "In t

Re: Is this a bug?

2005-04-24 Thread Robert Kern
e += is sugar for. In [1]:a = ['hello'] In [2]:a.extend("world") In [3]:a Out[3]:['hello', 'w', 'o', 'r', 'l', 'd'] It's a *good* thing that .extend() takes any iterable without explicit conversion to a li

Re: Is this a bug?

2005-04-24 Thread Robert Kern
yes. But this could certainly be clearer. I don't see how that statement has anything to do with the bug at hand. It's a mistake, but it's been in the wild too long to be changed. Thus, it should be documented. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell wh

Re: What's do list comprehensions do that generator expressions don't?

2005-04-24 Thread Robert Kern
pression if I'm going to require 2.4 anyway? Never. If you really need a list list(x*x for x in xrange(10)) Sadly, we can't remove list comprehensions until 3.0. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die

Re: What's do list comprehensions do that generator expressions don't?

2005-04-24 Thread Robert Kern
Steven Bethard wrote: Robert Kern wrote: Mike Meyer wrote: Ok, we've added list comprehensions to the language, and seen that they were good. We've added generator expressions to the language, and seen that they were good as well. I'm left a bit confused, though - when would I

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Robert Kern
jfj wrote: Robert Kern wrote: Mike Meyer wrote: Ok, we've added list comprehensions to the language, and seen that they were good. We've added generator expressions to the language, and seen that they were good as well. I'm left a bit confused, though - when would I use a list co

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Robert Kern
jfj wrote: Robert Kern wrote: jfj wrote: 2) to convert a list/tuple/string to a list, which is done extremely fast. Add "any iteratable". Genexps are iterables. The thing is that when you want to convert a tuple to a list you know already the size of it and you can avoid using ap

Re: what is the best way to determine system OS?

2005-04-25 Thread Robert Kern
ks my script, so I need to be able to determine not simply "Linux" but to know exactly what unix the script is being run on. What is the best way to determine this? Look at the platform module. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are

Re: New versions of numarray?

2005-04-25 Thread Robert Kern
ppropriate answer. Or you can search Google Groups in comp.lang.python.announce for the numarray announcements. They contain the information you seek. http://groups-beta.google.com/group/comp.lang.python.announce -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high

Re: What do list comprehensions do that generator expressions don't?

2005-04-25 Thread Robert Kern
ost iterables like the one you showed above. list(x*x for x in xrange(1000)) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: Python documentation moronicities (continued)

2005-04-25 Thread Robert Kern
rsion is better. -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.org/mailman/listinfo/python-list

Re: What's do list comprehensions do that generator expressions don't?

2005-04-25 Thread Robert Kern
Jeremy Bowers wrote: On Sun, 24 Apr 2005 22:59:12 -0700, Robert Kern wrote: Never. If you really need a list list(x*x for x in xrange(10)) Sadly, we can't remove list comprehensions until 3.0. Why "remove" them? Instead, we have these things called "comprehensions" (w

Re: How do I parse this ? regexp ?

2005-04-27 Thread Robert Kern
. There's only so much work we can do for you. Also, take a look at David Mertz's fine _Text Processing in Python_ available in dead-tree form or online. http://gnosis.cx/TPiP/ -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams

Re: odeint function in SciPy

2005-04-27 Thread Robert Kern
ource or ask on the appropriate mailing list. But since if you do the latter, you'll still get me, odeint uses ODEPACK. http://www.netlib.org/odepack/opkd-sum -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die."

Re: Lexicographical sort for numarray

2005-04-27 Thread Robert Kern
Jason Mobarak wrote: import numarray as na import random # example array arr = range(100) random.shuffle(arr) arr = na.array(arr) arr = na.reshape(arr, (10,10)) print arr # not rowsort'ed arr.flat.sort() # key line print arr # rowsort'ed That's definitely not a lexicographic sort.

Re: Lexicographical sort for numarray

2005-04-27 Thread Robert Kern
, 75, 76, 77, 78, 79], [80, 81, 82, 83, 84, 85, 86, 87, 88, 89], [90, 91, 92, 93, 94, 95, 96, 97, 98, 99]]) -- Robert Kern [EMAIL PROTECTED] "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter -- http://mail.python.o

Re: 'isimmutable' and 'ImmutableNester'

2013-11-12 Thread Robert Kern
ble, but it may not be hashable because one of its contained objects is unhashable (whether due to mutability or something else). So your function is subject to both false negatives and false positives. Agreed. -- Robert Kern "I have come to believe that the whole world is an enigma, a

Re: To whoever hacked into my Database

2013-11-14 Thread Robert Kern
our server administration questions. Try this one: http://serverfault.com/ -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- htt

Re: Question regarding 2 modules installed via 'pip'

2013-11-16 Thread Robert Kern
On 2013-11-16 13:59, Νίκος wrote: HELP ME The kind people at http://serverfault.com/ can help you with your system administration problems. I'm afraid that we cannot. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is mad

Re: Question regarding 2 modules installed via 'pip'

2013-11-16 Thread Robert Kern
r the code of conduct. I'm old enough to remember moderated listservs (as was the fashion at the time) that would automatically reply to each new poster with the listserv's charter and expected rules of netiquette (which is what we called it in those halcyon days). -- Robert Kern "I

Re: argparse feature request

2013-11-22 Thread Robert Kern
) parser.add_argument('file', help='The sample file.') ... [git/mpstack]$ python print_stacks.py -h usage: print_stacks.py [-h] [-p] file positional arguments: file The sample file. optional arguments: -h, --help show this help message and exit -p, --perc

Re: argparse feature request

2013-11-22 Thread Robert Kern
On 2013-11-22 16:52, Neal Becker wrote: Robert Kern wrote: On 2013-11-22 14:56, Neal Becker wrote: I use arparse all the time and find it serves my needs well. One thing I'd like to see. In the help message, I'd like to automatically add the default values. What I'd

Re: argparse feature request

2013-11-22 Thread Robert Kern
On 2013-11-22 18:15, Neal Becker wrote: Robert Kern wrote: On 2013-11-22 16:52, Neal Becker wrote: Robert Kern wrote: On 2013-11-22 14:56, Neal Becker wrote: I use arparse all the time and find it serves my needs well. One thing I'd like to see. In the help message, I'

Re: Cracking hashes with Python

2013-11-26 Thread Robert Kern
t in class about this subject? -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-27 Thread Robert Kern
icantly matter. [1] To the extent that there is such a thing as a "standard" form of any language. Which there isn't, but I will grant you your premise for the time being. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-27 Thread Robert Kern
ilege given to any particular dialect has nothing to do with the form of the dialect itself and everything to do with the sociopolitical history of its speakers. None of that is relevant to speaking comprehensibly in an international environment. -- Robert Kern "I have come to believe that t

Re: Got a Doubt ! Wanting for your Help ! Plz make it ASAP !

2013-11-27 Thread Robert Kern
On 2013-11-27 13:29, rusi wrote: On Wednesday, November 27, 2013 6:27:52 PM UTC+5:30, Robert Kern wrote: On 2013-11-27 08:16, Antoon Pardon wrote: Op 26-11-13 22:42, Tim Delaney schreef: On 27 November 2013 03:57, Antoon Pardon wrote: So I can now ask my questions in dutch and expect

Re: Extending the 'function' built-in class

2013-12-01 Thread Robert Kern
ot-subtype#20030324rcnwbkfedhzbaf3vmiuer3z4xq -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Re: Packaging a proprietary Python library for multiple OSs

2013-12-05 Thread Robert Kern
ENET server (not just an NNTP server) to access. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list

Re: Does Python optimize low-power functions?

2013-12-06 Thread Robert Kern
han numerical exponentiation where `x**2` is not equivalent to `x*x`. Since objects are free to do so, the interpreter itself cannot choose to optimize that exponentiation down to multiplication. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made t

Re: Figuring out what dependencies are needed

2013-12-11 Thread Robert Kern
t (if any) error message is given by that assert, or how it fails. No, the > arrow points to the active line in that frame of the traceback. Unfortunately, the OP cut off the remaining frames under `load_from_yahoo()` actually has the assert that is failing. -- Robert Kern "I h

Re: smart splitting - how to

2013-12-13 Thread Robert Kern
ibrary/shlex [~] |1> import shlex [~] |2> shlex.split(r'"Guido \"van\" Rossum" invented Python') ['Guido "van" Rossum', 'invented', 'Python'] -- Robert Kern "I have come to believe that the whole world is an eni

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-17 Thread Robert Kern
-- It most certainly is not. wxPython has handled Unicode (via `unicode` strings) for many, many years now. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying

Re: how to handle captcha through machanize module or any module

2013-12-18 Thread Robert Kern
n, but not this. Please stop asking this question. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.

Re: Debugging on the Mac question.

2014-01-03 Thread Robert Kern
der Perl I just added the -d switch and had a full debugger that worked at the console level. Python also has a console debugger. -d does not invoke it; -d is for something else. $ python -m pdb myscript.py http://docs.python.org/3.3/library/pdb -- Robert Kern "I have come to believe

Re: data validation when creating an object

2014-01-16 Thread Robert Kern
On 2014-01-16 16:18, Roy Smith wrote: On Thursday, January 16, 2014 10:46:10 AM UTC-5, Robert Kern wrote: I prefer to keep my __init__() methods as dumb as possible to retain the flexibility to construct my objects in different ways. Sure, it's convenient to, say, pass a filename and hav

Re: data validation when creating an object

2014-01-16 Thread Robert Kern
ying to get our unit test suite to run faster. I came across one slow test which had an interesting twist. The class being tested had an __init__() method which read over 900,000 records from a database and took something like 5-10 seconds to run. Man, talk about heavy-weight constructors :-) I

Re: pytz question: GMT vs. UTC

2014-01-31 Thread Robert Kern
ng UNICODE DOUBLE COMBINING LINEFEED WITH QUOTE MARKER as line terminators. >>> len('\n\n>') 3 Clearly, the FSR is broken beyond repair. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad att

<    3   4   5   6   7   8   9   10   11   12   >