:\\DataFileTypes)
IMHO, Python is somewhat inconsistent in not producing a
compile-type error (or at least an annoying compile-time
warning) when presented with invalid escape sequences.
What it does, even though it's well-documented and usually
the right guess, is to encourage bad habits.
--
Rhodri James
.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
).
A souq is a bazaar :-)
Well, close enough anyway. It's another arabic word that translates as
market in both the mercantile and financial senses, I believe. Maybe
I've just read too much arabic-themed fiction, but I was surprised not
to find the word in my trusty Chambers.
--
Rhodri James
in *stringList*...
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
with it. Of course I still need to use \x20 for spaces, but that
is easy.
Erm, no. \x20 is exactly the same as in a string literal.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
last time I checked PEP8 to find out this
wasn't already the case - I would have sweared it was.
It is. Aahz added it a few weeks ago.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
. It should be trivial to
calculate all the different new trees that are one digit longer than a
previous tree.
Trivial yes, but the number of different new trees is large when you're
dealing with four digits, and ridiculous with 5.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http
)# bar is new name for foo
With true pass-by-value, this comment is not true. Bar would be a copy
of foo, not a new name. What happens to bar is then not reflected in
foo (depending on how deep the copy is), which is the objective of
pass-by-value.
--
Rhodri James *-* Wildebeeste Herder
and enough of your code to make sense of
it would have helped. Without context, my best guess is that
localFileName isn't actually a string.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
. If you absolutely must prat
around with indirections like this, wouldn't
s = getattr(dialog, variable_containing_the_string_stopV).get()
be a much less unsafe idea?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
!
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
))
Does that look more like what you were expecting?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 04 Mar 2009 23:28:32 -, Tino Wildenhain t...@wildenhain.de
wrote:
Rhodri James wrote:
On Wed, 04 Mar 2009 22:58:38 -, vibgyorbits bka...@gmail.com
wrote:
I'm writing a tool to do some binary file comparisons.
I'm opening the file using
fd=open(filename,'rb')
# Need
), then it depends
on what your function is supposed to be doing. If it's changing every
element of the list, doing the changes in-place should be a doddle. If
it's filtering some elements out (like your example of omitting every
other element) then it's much easier to build a new list.
--
Rhodri
it!
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 07 Mar 2009 05:03:08 -, Grant Edwards gra...@visi.com wrote:
On 2009-03-07, Rhodri James rho...@wildebst.demon.co.uk wrote:
On Fri, 06 Mar 2009 15:34:08 -, Grant Edwards inva...@invalid
wrote:
On 2009-03-06, Fencer no.s...@plz.ok wrote:
Hi, I need a boolean b to be true
suspect you're going
to find that rather hard.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 10 Mar 2009 12:41:07 -, W. eWatson notval...@sbcglobal.net
wrote:
[snippety snip]
Rhodri James wrote:
You're misunderstanding. The line that you arrowed above has
absolutely
nothing whatsoever to do with the method body(), so keeping on
showing
us ever fuller version
it
doesn't mention doing a copy and (failing to) delete instead of moving the
file when doing cross-volume renames, but that's what the OS will have to
do.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
, ...
entry.insert(0,self.slowdown) --- no affect.
Erm, no. You stated (and showed us the code) that it was
entry = Entry(master,...).grid(...)
*big* difference, and
entry.insert(0, self.slowdown)
*raises an exception*, which is a long way from having no effect.
--
Rhodri James
this would add confusion rather than remove it.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Fri, 13 Mar 2009 16:39:16 -, Scott David Daniels
scott.dani...@acm.org wrote:
The original proposal was initially appealing to me until I saw this
comment. That means a relatively invisible typo would turn into good
syntax. Possibley this is exactly what Rhodri James is talking about
On Fri, 13 Mar 2009 15:33:26 -, MRAB goo...@mrabarnett.plus.com
wrote:
Rhodri James wrote:
On Fri, 13 Mar 2009 14:49:17 -, Beni Cherniavsky
beni.cherniav...@gmail.com wrote:
Specification
=
Allow keyword arguments in function call to take this form:
NAME
could be right, Gary's assumption of less
understanding rather than more is clearly the safer one to take.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 15 Mar 2009 15:05:04 -, Matthew Woodcraft
matt...@woodcraft.me.uk wrote:
Rhodri James rho...@wildebst.demon.co.uk writes:
On Sun, 15 Mar 2009 13:26:17 -, Matthew Woodcraft
It seems clear to me that Maxim understood all this when he asked his
original question (you need
!
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
well be in
the class. If the attribute is specified as self.attribute, then
yes, put it in the instance.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Sun, 15 Mar 2009 19:00:43 -, MRAB goo...@mrabarnett.plus.com
wrote:
Rhodri James wrote:
[snip]
Frankly, I'd much rather fix the locale system and extend
the format syntax to override the default locale. Perhaps
something like
financial = Locale(group_sep=,, grouping=[3])
print
On Sun, 15 Mar 2009 23:26:04 -, Aaron Brady castiro...@gmail.com
wrote:
On Mar 15, 1:50 pm, Rhodri James rho...@wildebst.demon.co.uk
wrote:
On Sun, 15 Mar 2009 17:55:25 -, Aaron Brady castiro...@gmail.com
wrote:
On Mar 15, 12:39 pm, John Posner jjpos...@snet.net wrote:
(My
is {fin.format(10d, {0}, True)}.format(1235467,
fin=financial))
assuming the locale.format() method remains unchanged? That's horrible,
and I'm pretty sure it can't be right, but I'm too tired to think of
anything more sensible right now.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http
to the class. I blame having two hours
of sleep in three days for this particular bit of dimness, sorry.
P.S. Do you pronounce 'wildebeeste' like 'vildebeeste'?
No, with a w not a v. It's just one of those titles that
stick with you no matter what you do.
--
Rhodri James *-* Wildebeeste Herder
at
the actual code-base, methinks.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
prefer the format to have a fixed default so that if you don't
specify the locale the result is predictable.
Shouldn't that be the global locale?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 17 Mar 2009 02:41:23 -, MRAB goo...@mrabarnett.plus.com
wrote:
Rhodri James wrote:
On Tue, 17 Mar 2009 01:47:32 -, MRAB goo...@mrabarnett.plus.com
wrote:
I'm not against putting a comma in the format to indicate that grouping
should be used just as a dot indicates
it at least as efficiently? If not, there's
no point in being clever, do it the readable way.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
of showing you what's going on!
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
to print-as-function is one of the
things that will throw beginners very badly indeed if your handouts
and computers don't make the same assumptions!
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
be illuminating?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
could
think of.
Once you've shown them exceptions, show them context managers briefly.
It's amazing how much they can simplify some types of exception handling.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
this is private, please don't call/use/alter this. Then don't
call/use/alter it from outside the class. You don't really need
anything stronger than convention unless for some odd reason you
don't trust yourself.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman
:
self.__setattr__(txtctrl_path, self.txtctrl)
it will do exactly what you're after!
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 28 Mar 2009 00:51:04 -, Rhodri James
rho...@wildebst.demon.co.uk wrote:
On Fri, 27 Mar 2009 21:51:19 -, alex ale...@bluewin.ch wrote:
Hi all
I am working on a Dialog window for a gui in wxPython and started
refactoring it, below code is a simplified version of it.
def
box1Labels needs to return is
((Input Path:, Browse, self.BrowseInDlg, txtctrl_inpath), ...
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
expect your file to be included as a module at some time in the
future. When that time comes, having your menu structure rely on
module globals that will not exist (because the mesg = Label()
doesn't get run) will cause your program to explode messily in a
deeply confusing way.
--
Rhodri James
that. Running with python -t will warn you about
this sort of thing.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
of wording
(the nearest thing we have in print to tone of voice) did not
inspire me to go digging around in source that you have just as
easy access to, in order to answer questions that I'm not
particularly interested in.
--
Rhodri James *-* Wildebeeste Herder to the Masses
(Also a bit grumpy
knowing the return type of a
function or method affects decision speed in calling it at all.
I suppose it might allow some optimisation of subsequent
operations on the result, but given the dynamic typing nature
of Python I can't see that being worth the considerable effort.
--
Rhodri James
, which has
more to do with how many subclauses, like these, you can cope with
being active at any one time before you forgot what the sentence
started off being about :-)
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, 30 Mar 2009 00:13:46 +0100, Alan G Isaac alan.is...@gmail.com
wrote:
Since you did not address my question about
the nuance of magic, I'm inclined to treat
you as a no vote.
And you'd be wrong.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman
allow you to make mistakes
about what's actually happening. That's the whole point of
it.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
operators you want. You also
ought to think about raising an exception when
__getitem__ or __setitem__ are presented with an index
larger than their size.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
* (including the *whole* traceback)
is Python saying to you?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
-documenting because it's spread out all
over the place. It also has the major disadvantage from my point of
view of requiring Python to do magic in the background to figure out
just what is being configured.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo
values together.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 31 Mar 2009 07:06:50 +0100, jfager jfa...@gmail.com wrote:
On Mar 30, 9:31 pm, Rhodri James rho...@wildebst.demon.co.uk
wrote:
On Mon, 30 Mar 2009 16:59:12 +0100, jfager jfa...@gmail.com wrote:
It's the configuration problem. Right now you would use something
like ConfigParser
subscripting,
since you spend most of your time iterating through lists instead.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 01 Apr 2009 04:15:00 +0100, Lada Kugis lada.ku...@gmail.com
wrote:
On Wed, 01 Apr 2009 03:59:36 +0100, Rhodri James
rho...@wildebst.demon.co.uk wrote:
Two opportunities to forget to lie about how big your array is
It is rank 3, meaning a33 is the last element. I don't see how
than you might hope.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
of the pypcap website suggests that yes, it can.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
that the concept of zero arrived too late to
influence our fundamentally latinate language for ordinal numbers. (In
other words, don't go thinking that there's anything logical about
natural language :-)
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python
On Wed, 01 Apr 2009 05:15:19 +0100, jfager jfa...@gmail.com wrote:
On Mar 31, 10:44 pm, Rhodri James rho...@wildebst.demon.co.uk
wrote:
[...] What
restrictions can be put on the value you get back? What can the
help system say about this, or do we have to go back to doing all
that by hand
On Thu, 02 Apr 2009 17:02:30 +0100, David C. Ullrich
dullr...@sprynet.com wrote:
Sometime I gotta get around to actually learning this 2.x
stuff. Thought I had an idea how 1.x worked...
3.x may come as a bit of a surprise :-)
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http
iterator.next()
1
iterator.next()
2
iterator.next()
3
Here you already have a single instance, and you don't throw it away
after incrementing its counter.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
value object isn't an
iterator and doesn't obey the Iteration protocol. Expecting to be
able to iterate over it is a tad optimistic.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
free up some processor time, but it still leaves me with
the problem of retroactive model updates.
You are dealing with a network. Errors *will* happen. Plan for them
from the start, or they will turn your design into spaghetti :-)
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http
On Thu, 02 Apr 2009 19:24:49 +0100, Kay Schluehr kay.schlu...@gmx.net
wrote:
Good to know. Uninstalling a major feature that enhances usability
just to make it usable isn't much less ironic though.
Meh. Use the command line like God intended.
--
Rhodri James *-* Wildebeeste Herder
an
iterator. Once it's got, for calls next() on the iterator each
time round the loop. Very approximately, that little for-loop
translates to:
a = [1,2,3,4]
i = iter(a)
try:
while True:
x = i.next()
print x
except StopIteration:
pass
--
Rhodri James *-* Wildebeeste Herder
the newsgroup.
I see no reason that a list shouldn't have a .clear method.
This I wouldn't disagree with, though I imagine it will increase
the frequency of complaints from people who haven't understood
Python's assignment model.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http
that as an exercise for the
reader :-)
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
Here's A doing something
def __init__(self):
self.A = ClsB.ClsA()
def do_something(self):
print Here's B doing something
b = ClsB()
b.do_something()
b.A.do_something()
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python
On Tue, 07 Apr 2009 12:46:18 +0100, J. Clifford Dyer
j...@sdf.lonestar.org wrote:
On Mon, 2009-04-06 at 23:41 +0100, Rhodri James wrote:
On Mon, 06 Apr 2009 23:12:14 +0100, Anish Chapagain
anishchapag...@gmail.com wrote:
Hi,
I was trying to extract wikipedia Infobox contents which
the regulatory authorities otherwise (depending on what
country you're in) you could end up on the wrong end of some very
expensive law-suits without actually having done anything wrong. Check
first.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
equality too.
my_list = [ 1024 ]
my_list.append(1024) # Defeat the interpreter's cunningness
ids = map(lambda x: id(x), ml)
ids
[9864656, 9864704]
sum(ids)/len(ids) == ids[0]
False
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
of a
semi-colon, and import sys first, then yes. Your standalone
client however makes no sense to me at all. How *exactly*
are you invoking your Python script?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
scripts from the command line. That
said, IDLE (which comes packaged with Python) is a perfectly decent
little IDE. It's surprising how little you really need given the
flexibility and immediacy of working with Python.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http
?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
.
And what, pray, did the traceback say? What was |c| before
you started that last loop of Radiobutton creation?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
me on this one.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
: the worksheets are built around Python 2.x (for small values of
x!), tell your friend not to use Python 3.0. This is one of the few cases
where it really matters that 'print' is now a function; nothing freaks a
beginner like his output not behaving the way he's been told it should.
--
Rhodri James
, or at
least not more than momentarily.
I'm -0 on this at the moment. Maybe -0.5. I don't really like the
potential for hideousness like
@staticmethod
def spam.alot(isa, silly, place):
return silly + spam
that's implied by making this a general feature of methods.
--
Rhodri James
On Sun, 07 Dec 2008 07:27:51 -, Lawrence D'Oliveiro
[EMAIL PROTECTED] wrote:
In message [EMAIL PROTECTED], Rhodri
James wrote:
Yes, it's very pretty, and you're terribly clever. In six months' time
when you come back to make some engineering change and have to sit down
and break
The LiveWires Python Course, http://www.livewires.org.uk/python/home
is aimed at your son's age-group. There are several worksheets that
involve building games using a simple veneer over pygame, if you
need to entice him with something!
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http
the same as __eq__, otherwise
you end up with the confusion that the Perl == and eq operators
regularly cause.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
'output' to 'final_out' with no
guarantee that 'output' has ever been assigned to.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
]
:-)
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 11 Dec 2008 23:49:10 -, John Machin sjmac...@lexicon.net
wrote:
On Dec 12, 10:31 am, Rhodri James rho...@wildebst.demon.co.uk
wrote:
On Thu, 11 Dec 2008 19:49:23 -, Steve Holden st...@holdenweb.com
wrote:
... and it's so hard to write
item = item[:-1]
Tsk
the intermediate
directory creation so you don't even need to sort the list.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
| in |b| is still in lexical scope, though.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
Run Module for anything
but the most straightforward Python code.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
still not terribly
clear as to why you need so many. Is each list intended for a different
instrument, so you're more looking at:
violin_1 = [ ...stuff... ]
violin_2 = [ ...other stuff...]
viola = [ ...really sweet stuff... ]
cello = [ ...really boring stuff... ]
--
Rhodri James
On Tue, 23 Dec 2008 04:35:42 -, Grant Edwards gra...@visi.com wrote:
IIRC, Python came pre-installed on my IBM Thinkpad. However,
it wasn't anyplace the average user would stumble across it...
The suggestively named IBMTOOLS directory, I believe :-)
--
Rhodri James *-* Wildebeeste
__A and __B are full of zeroes, then you should suspect your
notes.pitchTwist() and rhythm.rhythmTwist() methods of returning zeroes.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
EMACS configuration. Every
other language I use (yes, including C) I learned afterwards.
Moral: times change.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
working with other languages. I don't know
why this should be, but it is.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
of secured protocol instead?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
that were conceptually
the same across the languages, instead of things that only looked
similar. Which is where the data model comes in, as has already been
explained at length, several times now.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python
to implement a backup strategy. If you are,
I'd suggest your problem is XCOPY -- you really need something more
combat capable instead.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
arrays are anomalous in comparison with other C data types.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
underscore = private convention, and I just don't see
a burning need for it, that's all.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
1 - 100 of 855 matches
Mail list logo