Re: string to list when the contents is a list

2010-02-17 Thread Rhodri James
() it. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Interesting talk on Python vs. Ruby and how he would like Python to have just a bit more syntactic flexibility.

2010-02-17 Thread Rhodri James
an explicit return value it returns None. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: The future of frozen types as the number of CPU cores increases

2010-02-18 Thread Rhodri James
, all with the same core but with some stuff turned off.) Python isn't ready for this. Not with the GIL. Is any language, save perhaps Erlang, really ready for it? occam :-) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: string to list when the contents is a list

2010-02-18 Thread Rhodri James
, parsing is the only sensible answer. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: MODULE FOR I, P FRAME

2010-02-18 Thread Rhodri James
bindings to the libraries that might help depending on exactly how you are streaming your video. Unfortunately the documentation is sparse to put it mildly, and pyffmpeg makes tstools look positively informative about how you're supposed to use it. -- Rhodri James *-* Wildebeeste Herder

Re: MODULE FOR I, P FRAME

2010-02-22 Thread Rhodri James
more about what you mean when you say the effect of errors? It's easy enough to introduce bit errors into a data file (just flip random bits), but I'm not clear what it is you're trying to measure. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman

Re: MODULE FOR I, P FRAME

2010-02-23 Thread Rhodri James
(if obviously wrong) image surprisingly quickly. PS: my first name is Rhodri, not James. Don't worry, it catches a lot of people out. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating variables from dicts

2010-02-24 Thread Rhodri James
technical trickery. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Variable definition

2010-02-26 Thread Rhodri James
On Fri, 26 Feb 2010 23:32:27 -, Raphael Mayoraz may...@netplus.ch wrote: I'd like to define variables with some specific name that has a common prefix. Why? No seriously, how do you think this is going to solve whatever problem you clearly think it will solve? -- Rhodri James

Re: Variable definition

2010-03-01 Thread Rhodri James
. In the example I give, I would get 3 variables: myPrefixred = a myPrefixgreen = b myPrefixblue = c I repeat my previous question: why? What problem do you think this will solve that will not be more easily solved working with the language rather than against it? -- Rhodri James

Re: Docstrings considered too complicated

2010-03-03 Thread Rhodri James
:-) -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Interest check in some delicious syntactic sugar for except:pass

2010-03-03 Thread Rhodri James
: block except: pass -100 This catches Control-C interrupts, sys.exit(), subtle typos in the code, and sundry other errors that actually you *did* want to know about. Silence isn't so much golden as pyritic. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http

Re: Is behavior of += intentional for int?

2009-08-30 Thread Rhodri James
as they are. I am also not think about names as reference to objects and so on. Then you are doomed to surprises such as this. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: lambda functions

2009-08-31 Thread Rhodri James
of it being an *anonymous* function! What are you actually trying to do here? There's almost certainly a better way to do it than this. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating slice notation from string

2009-09-02 Thread Rhodri James
this. Speed is not a big deal in this. As to malicious input, I could pretty easily check to see that all the values are integers. If you've done that check, you've parsed the input so you might as well use the values you've derived rather than waste time and add risk by using eval(). -- Rhodri

Re: issue with grep command

2009-09-03 Thread Rhodri James
to ask: *what* complains that the file is not in the right format? Also, I don't think you meant frep that second time, but your typing is sufficiently awful I can't be sure. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: efficiently splitting up strings based on substrings

2009-09-05 Thread Rhodri James
the case, this ought to help: import re x = 00122 m = re.match(r(0*)(1*)(2*), x) m.groups() ('00', '1', '22') y = 00111 m = re.match(r(0*)(1*)(2*), y) m.groups() ('00', '111', '') You'll have to filter out the empty groups for yourself, but that's no great problem. -- Rhodri James

Re: efficiently splitting up strings based on substrings

2009-09-05 Thread Rhodri James
On Sat, 05 Sep 2009 23:54:08 +0100, per perfr...@gmail.com wrote: On Sep 5, 6:42 pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Sat, 05 Sep 2009 22:54:41 +0100, per perfr...@gmail.com wrote: I'm trying to efficiently split strings based on what substrings they are made up of. i have

Re: efficiently splitting up strings based on substrings

2009-09-05 Thread Rhodri James
example code, but it's nearly 1am and I'd be sure to commit fence-post errors at this time of night. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: An assessment of the Unicode standard

2009-09-14 Thread Rhodri James
variation within the dialectal family of English to make an attempt to render it phonetically much use. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: LinkedIn Messages, 9/15/2009

2009-09-15 Thread Rhodri James
On Tue, 15 Sep 2009 14:39:04 +0100, LinkedIn Communication communicat...@linkedin.com wrote: LinkedIn [snippety snip] Methinks the spam filter needs updating. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Remove empty strings from list

2009-09-15 Thread Rhodri James
l = line.split() instead of l = line.split(' ') and not getting the empty strings in the first place. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Fwd: Converting a script to Python 3 - having trouble.

2009-09-15 Thread Rhodri James
=True) stderr = pipe.stdin.write(password) time.sleep(1) stderr = pipe.stdin.write(password) if pipe.stdin.close != 0: Did you perhaps mean if pipe.stdin.close(): ? Does it help if you read stdout rather than sleeping for arbitrary periods? -- Rhodri James

Re: easy question, how to double a variable

2009-09-23 Thread Rhodri James
On Mon, 21 Sep 2009 21:49:50 +0100, daggerdvm dagger...@yahoo.com wrote: you brain needs error checking! Your post, by contrast, needs grammar checking. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Most active coroutine library project?

2009-09-23 Thread Rhodri James
) recollection that explicit yielding was what made them coroutines rather than general cooperative multitasking. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching a large dictionary

2009-09-23 Thread Rhodri James
return result Note that this won't work on the 'sec' field, since it's a number rather than a string. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Intercepting binding?

2009-09-23 Thread Rhodri James
() chips.spam = Foo() spam[eggs.beans['chips']] = Foo() spam.append(Foo()) and so on. The thing to google for is Python's assignment model, because it's probably not what you think it is. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Intercepting binding?

2009-09-23 Thread Rhodri James
, I'm being very dim tonight. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Searching a large dictionary

2009-09-23 Thread Rhodri James
for trouble when you carry blithely on with mis-shapen data. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Evaluate coding and style

2009-09-24 Thread Rhodri James
in, __name__ will be the name of the module (i.e. homedir_exists) instead of __main__, so the original checkDir(userlist) won't be executed. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Intercepting binding?

2009-09-24 Thread Rhodri James
is going to break on my when I need it (i.e. in the complicated cases), I don't bother using that tool again. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: iterate over list while changing it

2009-09-24 Thread Rhodri James
. new_a = [] for x in a: if x != 3: new_a.append(x) if x == 4: new_a.append(88) # or whatever you intended push to mean If you weren't doing the insertion, you could have used a list comprehension and neatened things up a bit. -- Rhodri James *-* Wildebeest Herder to the Masses

Re: Regex trouble

2009-09-24 Thread Rhodri James
leading 1, which can be done with a bit of straightforward string slicing but still puts REs more sensibly in the running. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Multidimensional arrays/lists

2009-09-27 Thread Rhodri James
awfully easy to end up with rows being the same list object if you're careless, and then unexpected things happen :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Most active coroutine library project?

2009-09-30 Thread Rhodri James
and shoulders above the 8-bit PIC family.] I was going to say, you want 256 bytes of RAM, you profligate so-and-so? Here, have 32 bytes of data space and stop your whining :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: creating class objects inside methods

2009-10-04 Thread Rhodri James
, every educator who comes along afterwards will curse your name. That includes teaching yourself. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: bug with itertools.groupby?

2009-10-06 Thread Rhodri James
like: grouped acc: 61 grouped acc: 64 then you're going to have to sort your info_list first. That might not be desirable, depending on just how long it is. If you tell us more about your specific use case, we may be able to give you more specific advice. -- Rhodri James *-* Wildebeest Herder

Re: creating class objects inside methods

2009-10-06 Thread Rhodri James
variable, you change what the program will do in the future, usually in fairly major ways that may not be visible from wherever your assignment takes place. I'm hardly an expert in the area, but that does seem to be the point of a lot of object-oriented design. -- Rhodri James *-* Wildebeest Herder

Re: mxDateTime history (Re: mktime, how to handle dates before 01-01-1970 ?)

2009-10-11 Thread Rhodri James
of the month rather than the start, which makes the last day of January and January 31 not the same thing really. Unfortunately we're very fuzzy about when we do things like this, which makes it hard on a poor programmer. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman

Re: Writing to function arguments during execution

2009-10-11 Thread Rhodri James
of religious debate :-) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: which dictionary with attribute-style access?

2009-10-12 Thread Rhodri James
://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/361668 3. web2py codebase: Storage(dict) I enclosed the three implementations below. My question to the Python specialists: which one is the most correct? Accessing the dictionary as a dictionary. -- Rhodri James *-* Wildebeest Herder to the Masses -- http

Re: Documentation of 2.x indicating what will be gone in 3.x?

2009-10-12 Thread Rhodri James
. Look in the What's New documents, starting with http://docs.python.org/3.1/whatsnew/3.0.html -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: for loop: range() result has too many items

2009-10-13 Thread Rhodri James
you read the documentation at all? -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: The rap against while True: loops

2009-10-14 Thread Rhodri James
On Wed, 14 Oct 2009 02:26:17 +0100, Mensanator mensana...@aol.com wrote: On Oct 13, 5:38�pm, Rhodri James rho...@wildebst.demon.co.uk wrote: On Tue, 13 Oct 2009 22:59:04 +0100, Mensanator mensana...@aol.com wrote: And I'm not saying John nor the OP should stop using what works for them

Re: Why does passing tuple as arg WITHOUT scattering work?

2009-10-20 Thread Rhodri James
like that if you don't need to. However, generally speaking a function will expect a tuple or not; libraries that can cope with either are the exception rather than the rule. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: md5 strange error

2009-10-21 Thread Rhodri James
. _pass = md5.new() Other way round; you put the underscore at the end according to PEP-8 (http://www.python.org/dev/peps/pep-0008/) pass_ = md5.new() -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Please help with regular expression finding multiple floats

2009-10-22 Thread Rhodri James
for the 're' module at python.org is your friend! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Read any function in runtime

2009-10-26 Thread Rhodri James
get any sympathy from here. The safe answer is to write yourself a small parser. Given that you've got a very limited symbol set, that shouldn't be too hard. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this pylint error message valid or silly?

2009-06-19 Thread Rhodri James
record_data is None is a cheap test, while record_data == defaults to today's date is an expensive test as well as easy to mistype. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: persistent composites

2009-06-19 Thread Rhodri James
On Fri, 19 Jun 2009 14:24:34 +0100, Aaron Brady castiro...@gmail.com wrote: You are not being any help, Rhodri, in your question. To you, perhaps not. To me, it has at least had the effect of making what you're trying to do (write a pythonic object database) clearer. -- Rhodri James

Re: Inheritance and forward references (prototypes)

2009-06-20 Thread Rhodri James
: test = A() self.obj = A() and so on. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: re.NONE

2009-06-22 Thread Rhodri James
to re.match() and the like. There's no issue with defining that to be 0, since it is the correct value! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Rhodri James
PEP 378 got in then? Bleh. It's still the wrong solution, and it still makes the right solution harder to do. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: pep 8 constants

2009-06-28 Thread Rhodri James
for an SR system than any other convention. If, on the other hand you're trying to convince me that *no* convention is preferable, I'm going to laugh hollowly. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: [RELEASED] Python 3.1 final

2009-06-28 Thread Rhodri James
of that paragraph, Martin! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: pep 8 constants

2009-06-29 Thread Rhodri James
On Mon, 29 Jun 2009 06:07:19 +0100, Eric S. Johansson e...@harvee.org wrote: Rhodri James wrote: Reject away, but I'm afraid you've still got some work to do to convince me that PEP 8 is more work for an SR system than any other convention. [snip sundry examples] Yes, yes, recognition

Re: pep 8 constants

2009-06-29 Thread Rhodri James
On Mon, 29 Jun 2009 20:28:07 +0100, Eric S. Johansson e...@harvee.org wrote: Rhodri James wrote: As far as I can tell, the only thing that you are even vaguely suggesting for convention use is underscores_with_everything. As promised, I laugh hollowly. I'm sorry. It may have been too

Re: pep 8 constants

2009-06-30 Thread Rhodri James
to be smart enough -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: pep 8 constants

2009-06-30 Thread Rhodri James
On Tue, 30 Jun 2009 09:57:27 +0100, Rhodri James rho...@wildebst.demon.co.uk wrote: On Tue, 30 Jun 2009 03:37:15 +0100, Eric S. Johansson e...@harvee.org wrote: Steven D'Aprano wrote: Why do you think a smart editing environment is in opposition to coding conventions? Surely an editor

Re: Specific iterator in one line

2009-06-30 Thread Rhodri James
can filter objects using if in list comprehension. If you'll allow me a prior import itertools, [i for e in [1,0,0,1] for i in itertools.repeat('ab'[e], e+1)] does the job in 62 characters. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python

Re: pep 8 constants

2009-06-30 Thread Rhodri James
. Incidentally, since what you're proposing is essentially templating, wouldn't it be better to do it as post-processing on the speech recognition rather than building it directly into an editor? to resolve -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python

Re: Python/Pygame question

2009-07-01 Thread Rhodri James
pygame.image.load() to load your file into a surface, then blit it into your display. Some resizing may be necessary! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: String to List Question

2009-07-02 Thread Rhodri James
/csv.html You can define yourself a reader that splits the input on tabs, and then see how long the rows it returns are. Something like this (untested): import csv for row in csv.reader(open(phone_numbers.txt, rb), delimiter='\t'): if len(row) 1: # Do your stuff -- Rhodri James

Re: pep 8 constants

2009-07-05 Thread Rhodri James
, just thinking out loud. You can get giant piano keyboards that you step on, so how about a giant computer keyboard? I wrote 5 miles of code before lunch! :-) You can get/make MIDI organ pedal-boards (a friend of mine has two). From there it's just one small step... :-) -- Rhodri James

Re: PEP368 and pixeliterators

2009-07-05 Thread Rhodri James
of abstraction, that's just fine, but the assumption that an image is made up of a 2D array of pixels is not safe. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: A Bug By Any Other Name ...

2009-07-06 Thread Rhodri James
programming. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and webcam capture delay?

2009-07-06 Thread Rhodri James
the webcam claims to deliver. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Python and webcam capture delay?

2009-07-06 Thread Rhodri James
On Mon, 06 Jul 2009 18:41:03 +0100, jack catcher (nick) nom...@thank.you wrote: Rhodri James kirjoitti: Does the webcam just deliver frames, or are you getting frames out of a decoder layer? If it's the latter, you want to distribute the encoded video, which should be much lower bandwidth

Re: Why re.match()?

2009-07-06 Thread Rhodri James
() over re.search() are considered worth the (small) increase in size. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Newbie needs help

2009-07-06 Thread Rhodri James
environment? Which Python version for that matter? We may appear to be mind-readers, but we usually need a bit more than this to work on. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Re: A Bug By Any Other Name ...

2009-07-06 Thread Rhodri James
On Mon, 06 Jul 2009 17:54:35 +0100, Dave Angel da...@ieee.org wrote: Rhodri James wrote: Indeed, arguably it's a bug for C compilers to fail to find the valid parsing of ++5 as +(+5). All I can say is that I've never even accidentally typed that in twenty years of C programming. But the C

Re: Semi-Newbie needs a little help

2009-07-06 Thread Rhodri James
the indentation of the print statement that produces this? Is it perhaps inside a loop still? -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for a slick way to classify relationship between two numbers, without tons of if/else

2009-07-06 Thread Rhodri James
as well revert to the if-chain, since it'll be a lot easier to understand when you come back to it in six months time. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: regex help

2009-07-08 Thread Rhodri James
say for sure. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: gett error message: TypeError: 'int' object is not callable

2009-07-09 Thread Rhodri James
know what all the built-in functions are. Over time a programmer will learn which names to avoid, but it's a bit of a pitfall early on. It's only really a pitfall if you try to use the built-in after you've redefined it. That's the thing to keep an eye open for. -- Rhodri James *-* Wildebeest

Re: help me to find the error

2009-07-10 Thread Rhodri James
the file this way means that if you accidentally write f0.write(something) instead of f2.write(something), Python will stop you with an exception rather than silently trash your data. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: need to write a assembly progrm

2009-07-10 Thread Rhodri James
as a tool kit for the lab.tell me any other solutions for this Please define what you mean by assembly. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: need to write a assembly progrm

2009-07-12 Thread Rhodri James
On Sat, 11 Jul 2009 05:17:18 +0100, Dennis Lee Bieber wlfr...@ix.netcom.com wrote: On Fri, 10 Jul 2009 13:25:49 +0100, Rhodri James rho...@wildebst.demon.co.uk declaimed the following in gmane.comp.python.general: On Thu, 09 Jul 2009 11:52:44 +0100, m.reddy prasad reddy reddy@gmail.com

Re: select lines in python

2009-07-15 Thread Rhodri James
at www.python.org rather than tell you exactly how. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Override a method but inherit the docstring

2009-07-16 Thread Rhodri James
return fn return _fn class BarGonk(FooGonk): @copydoc(FooGonk) def frobnicate(self): special_implementation(self.warble) -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Beginners question

2009-07-18 Thread Rhodri James
some_method(self): self.global_var = 2 a = ClassName() b = ClassName() b.some_method() print a.global_var, b.global_var ...gives the result 1 2 again! -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular expression

2009-07-21 Thread Rhodri James
, since the regular expresion makes little sense with the input you give. What are you trying to extract from the input, and what do you think you are getting at the moment? -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Regular expression

2009-07-21 Thread Rhodri James
On Tue, 21 Jul 2009 17:12:53 +0100, Peter Fodrek peter.fod...@stuba.sk wrote: 21.7.2009 v 17:39, Rhodri James: On Tue, 21 Jul 2009 14:30:47 +0100, Peter Fodrek peter.fod...@stuba.sk wrote: [snipped for space] This handles text file like // remark PL_OFF PARK FS MA 52.8806 , 18.0914

Re: Detect target name in descriptor __set__ method

2009-07-22 Thread Rhodri James
On Wed, 22 Jul 2009 06:02:55 +0100, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: class X(object): foo = descriptor() x = X() x.foo = value Isn't this going to create a brand new instance attribute x.foo that has nothing to do with the descriptor anyway? -- Rhodri James

Re: Not understanding this documentation

2009-07-22 Thread Rhodri James
code and the rest of the error message, please? I have a suspicion that the error actually lies in the necessary changes you made. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Detect target name in descriptor __set__ method

2009-07-23 Thread Rhodri James
On Thu, 23 Jul 2009 01:05:55 +0100, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: En Wed, 22 Jul 2009 11:01:09 -0300, Rhodri James rho...@wildebst.demon.co.uk escribió: On Wed, 22 Jul 2009 06:02:55 +0100, Gabriel Genellina gagsl-...@yahoo.com.ar wrote: class X(object): foo

Re: len() should always return something

2009-07-24 Thread Rhodri James
) should return 0. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: non-owning references?

2009-07-24 Thread Rhodri James
on the scene. While the OP appears to have the right idea, your correction here could be quite misleading. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: len() should always return something

2009-07-24 Thread Rhodri James
On Fri, 24 Jul 2009 16:10:07 +0100, Piet van Oostrum p...@cs.uu.nl wrote: Rhodri James rho...@wildebst.demon.co.uk (RJ) wrote: RJ On Fri, 24 Jul 2009 14:57:02 +0100, Grant Edwards inva...@invalid wrote: On 2009-07-24, Dr. Phillip M. Feldman pfeld...@verizon.net wrote: Some aspects

Re: non-owning references?

2009-07-24 Thread Rhodri James
On Fri, 24 Jul 2009 16:03:58 +0100, Piet van Oostrum p...@cs.uu.nl wrote: Rhodri James rho...@wildebst.demon.co.uk (RJ) wrote: RJ On Fri, 24 Jul 2009 14:55:45 +0100, Hrvoje Niksic hnik...@xemacs.org wrote: Ben Finney ben+pyt...@benfinney.id.au writes: Utpal Sarkar doe...@gmail.com

Re: len() should always return something

2009-07-25 Thread Rhodri James
that you are spending so much time complaining about. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Removing newlines from string on windows (without replacing)

2009-07-25 Thread Rhodri James
(myfile.txt, r) instead, the line endings are converted to \n on both Windows and Linux. If my crystal ball has proved faulty, giving us more details will help get a more sensible answer. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: If Scheme is so good why MIT drops it?

2009-07-26 Thread Rhodri James
of where it lives in the web application structure -- the part of the language that was thought about very hard. Beyond that there's nothing much to master, so the whole ease vs power debate is rather pointless. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman

Re: set variable to looping index?

2009-07-29 Thread Rhodri James
fighting the language unnecessarily here. If you have a sequence of functions that you want a sequence of results out of, you should be thinking in terms of a sequence type. A list, in other words. results = [] for f in fn1, fn2, fn3: results.append(f()) -- Rhodri James *-* Wildebeest Herder

Re: Printing with colors in a portable way

2009-07-30 Thread Rhodri James
all that you can say. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: fast video encoding

2009-08-03 Thread Rhodri James
; even then, if it does make a significant difference then you needed greater resolution anyway. -- Rhodri James *-* Wildebeest Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this make sence? Dynamic assembler for python

2010-06-20 Thread Rhodri James
are grobbling about with hardware, and if you are doing that, Python wasn't the best place to start from. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Is this make sence? Dynamic assembler for python

2010-06-21 Thread Rhodri James
On Mon, 21 Jun 2010 04:34:40 +0100, Steven D'Aprano steve-remove-t...@cybersource.com.au wrote: On Sun, 20 Jun 2010 22:45:14 +0100, Rhodri James wrote: No. Modern C compilers often produce very good machine code, but the best hand-written assembly code will be better. I can usually write

Re: Should I Learn Python or Ruby next?

2010-06-22 Thread Rhodri James
on which r blathered on in a manner that could be mistaken for those things if one didn't actually read what was written. -- Rhodri James *-* Wildebeeste Herder to the Masses -- http://mail.python.org/mailman/listinfo/python-list

Re: Should I Learn Python or Ruby next?

2010-06-23 Thread Rhodri James
syntactically-correct linear-flow than the two code snippets i provided earlier, hmmm? You did rather carefully pick an example where Python's syntax flow the other way round and then present all the least Pythonic paraphrases of the Ruby functional approach. -- Rhodri James *-* Wildebeeste Herder

<    1   2   3   4   5   6   7   8   9   >