ge extensions to communicate the
necessary info to the external tool.
Or, dare one say it, conventions?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Thu, 15 Jan 2009 03:54:02 -, Paul Rubin
<"http://phr.cx"@nospam.invalid> wrote:
"Rhodri James" writes:
> Again, there have to be some language extensions to communicate the
> necessary info to the external tool.
Or, dare one say it, conventions?
If
actually want to write is the script that
scans your C data structure and spits out a Python class or module that
implements it with whatever degree of checking you want. That should
make writing your actual data munger safer and faster, if I'm
understanding you correctly.
--
Rhodri Jame
da/ada-vs-c/cada_art.html
I agree. I suspect that its more the case that once most
programmers have been taught how to use the hammer that is C,
all problems look like nails.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
tirely the reverse.
List comprehension is actually quite a linguistically natural way
to express the iterative construction of a list.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
r = sys.argv[1]
self.arg1 = int(sys.argv[2])
self.arg2 = int(sys.argv[3])
If you want the test code to work, I think you mean:
def __init__(self, op, arg1, arg2):
self.operator = op
self.arg1 = arg1
self.arg2 = arg2
:)
--
Rhodri James *-* Wildebeeste Herd
ibute names (sorry, the terminology crossover is inherently
confusing) so much? Unless you think there's a serious danger of
trying to add new character attributes on the fly, I think it's
overkill.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 20 Jan 2009 02:11:24 -, Mensanator wrote:
On Jan 19, 7:44 pm, "Rhodri James"
wrote:
Surely in any case you don't want an expression based on the difference,
since that would give you the same chance of having the first attack no
matter what the levels of courag
On Tue, 20 Jan 2009 03:39:45 -, Xah Lee wrote:
On Jan 19, 4:49 pm, "Rhodri James"
wrote:
On Sun, 18 Jan 2009 08:31:15 -, Xah Lee wrote:
> On Jan 17, 10:25 am, Tino Wildenhain wrote:
>> > [[int(x) for x in line.split()] for line in open("blob.txt"
distinction through CONVENTIONAL_NAMING_PRACTICE is useful.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
which is a lot harder to find. Even if you could find a platform
supporting it, it doesn't help you on other platforms you may need to
run on. Just do the locking properly and worry about optimisations
later.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 21 Jan 2009 02:29:01 -, Paul Rubin
<"http://phr.cx"@nospam.invalid> wrote:
"Rhodri James" writes:
> What cpu's do you know of that can atomically increment and decrement
> integers without locking?
x86 (and pretty much any 8080 derivative,
is a good thing (my personal list
places more emphasis on the theory and practice of music, theology,
literature and democracy, but anything is fair game), expanding
one's ego is not.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 21 Jan 2009 05:37:44 -, Paul Rubin
<"http://phr.cx"@nospam.invalid> wrote:
"Rhodri James" writes:
In that case I'd second the suggestion of taking a long, hard look
at the Linux core locking and synchronisation primatives.
Do you understand wha
On Wed, 21 Jan 2009 09:42:19 -, Lars Behrens
wrote:
Rhodri James wrote:
I *was* thinking of code produced in the real world, and I don't buy
your assertion. I'm not an academic, and I wouldn't hesitate to lay
down a line of code like that. As I said before, it fi
On Wed, 21 Jan 2009 09:13:03 -, Xah Lee wrote:
Rhodri James wrote:
I recommend spending less time being certain that you are correct
without seeking evidence
I don't concur.
For instance, when you are talking to a bunch of kids, you have to be
sure of yourself, else they run all
ready exists, there's always a list
comprehension: [field(l) for l in a]
If you want that specific list:
[l[1] for l in a]
[2, 4, 6]
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
; button is the one selected). Similarly
self.colorVar.set(n) selects whichever radio button has the "value" which
matches n (so self.colorVar.set(2) selects the "Pseudo Color" button).
IntVar and StringVar (and DoubleVar if you must :-) are basically the
easy way of dynamically
any
of the good dance clubs), I'd have been better off taking a hacksaw
to the internals myself and presenting my fix for Fred's
consideration. Python allows me to do this without the fuss and
drama that strict encapsulation seems to posit is necessary,
instead of delaying an entire release
roadblock. Under those
circumstances you have three choices: 1) defeat the data hiding
by talking to Fred directly; 2) defeat the data hiding by hacking
away yourself and getting Fred's forgiveness later; 3) give up.
See, we're back on topic!
--
Rhodri James *-* Wildebeeste Herder to th
On Sun, 25 Jan 2009 00:31:14 -, Tim Rowe wrote:
2009/1/24 Rhodri James :
My experience with medium-sized organisations (50-100 people) is that
either you talk to Fred directly, or it doesn't happen. In particular
the more people (especially PHBs) that get involved, the slowe
t,
arg 1 is a tuple of two elements,
"somestring to execute" in globals()
and
locals()
which is also unlikely to be what you want. Neither of these are
giving you a string, file or code object, exactly as the interpreter
is telling you.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
h
On Thu, 29 Jan 2009 08:15:57 -, Hendrik van Rooyen
wrote:
"Rhodri James" wrote:
To:
Sent: Thursday, January 29, 2009 6:12 AM
Subject: Re: Exec woes
On Wed, 28 Jan 2009 07:47:00 -, Hendrik van Rooyen
wrote:
> This is actually not correct - it is the root cause
On Sun, 01 Feb 2009 17:31:27 -, Steve Holden
wrote:
Stephen Hansen wrote:
[...]
don't play with anyone else's
privates.
A good rule in life as well as programming.
Unless, of course, you're both consenting adults.
What? Someone had to say it!
--
Rhodri James
operations on it.
Wanted to check first to see if something exists, and not reinvent the
wheel.
There's TreeCtrl, and CustomTreeCtrl. I don't know whether they can be
used with drag and drop,
Yes they can, at least after a fashion. See
http://wiki.wxpython.org/TreeControls
--
Rh
uch harder (though by no means
impossible) to break language-enforced hiding when (not if) an
interface turns out to be inadequate.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
xed the typo. DataFH
and ResourceFH are both local variables to __init__ and
will be tossed away when it finishes executing. If you
want to use them later, make them self.data_fh and
self.resource_fh respectively.
(PEP 8 recommends that you use lower_case_with_underscores
for variable or attribute names, and leave MixedCase for
class names.)
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
probably
w/o luck because afaik there is no way to track the event
of having random keys pressed the same time.
Yes there is. You need to use one of the GUIs (Tkinter, wxPython,
PyGame, etc), all of which will give you Key Down/Key Up events.
--
Rhodri James *-* Wildebeeste Herder to the Masses
it's that trivial to defeat something that its proponents appear to
want to be close to an iron-clad guarantee, what on earth is the point
of using "private" in the first place?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 03 Feb 2009 05:37:57 -, Russ P. wrote:
On Feb 2, 7:48 pm, "Rhodri James" wrote:
On Tue, 03 Feb 2009 02:16:01 -, Russ P.
wrote:
> Here we go again. If you have access to the source code (as you nearly
> always do with Python code), then "breaking the l
den volte
face and declared that it was trivial to circumvent.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, 04 Feb 2009 01:13:32 -, Russ P. wrote:
On Feb 3, 4:05 pm, "Rhodri James" wrote:
I'm very much of the second opinion; it was Russ who did the sudden
volte
face and declared that it was trivial to circumvent.
Whoa! Hold on a minute here. Your failure to understan
#x27;t assigned to a name somehow), or just as easily
one or many names.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
What condition is "a height less
than 1/2 inch" in terms of your program?
(Hint: the condition isn't what I think you think it is -- remember that
"inches" is an int!)
How can I also take into account all the cases that need an exception?
How do you take care of any exception?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
e
the traditional name to use. So:
def demo(action, **kwargs):
... print kwargs
...
demo(action="dummy", text="wombats are go")
{'text': 'wombats are go'}
You can also use it the other way round to expand a dictionary into
keyword parameters to a function call:
myargs = { 'action': 'avoid', 'where': 'Camelot', 'because': 'it is a
silly place' }
demo(**myargs)
{'because': 'it is a silly place', 'where': 'Camelot'}
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
20 / len(c)
b = foo(d)
or even:
where:
a = 20 / len(c)
b = foo(d)
do:
p = a / b
Effectively you're creating a little local namespace for temporary
variables. I'm not sure it buys you a lot, even as sugar, and I'm
really not convinced by the bypartite form, but it's d
The name of the object is a name. It doesn't really exist as an
object at all.
As others have said, if you really want this information you'll need to
write your own class with a "name" attribute, and assign a suitable string
to it.
--
Rhodri James *-* Wildebeeste Herder to t
les are
optional, except for a couple of cases where you *have* to put them
in to avoid ambiguity. I tend to put them in always, but leaving them
out in cases like this seems to be normal practice.)
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
() except it is significantly slower and harder to
read.
Neither deal with quoted text, apostrophes, hyphens, punctuation or any
other details of real-world text. That's what I mean by "simple-minded".
You're missing something :-) Specifically, the punctuation gets swept
tring methods, and string interpolation!
So the moral of this story is take a ball of strings with you for
when you get lost in regular expressions.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
to
do it in Python, the only thing that springs to mind is
periodically checking the size of the file and reading more
when that changes. You'll need to be very careful to keep
what size you think the file is in sync with how much you've
read!
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
creating a new list.
a = [1, 2, 3]
b = a
a.append(4)
print b
Here, the list has both labels 'a' and 'b' attached to it. When we
call a.append, it doesn't create a new list or anything like that,
it just makes the existing list larger and tacks the
On Thu, 12 Feb 2009 16:44:56 -, W. eWatson
wrote:
I simply ask, "How do I get around the problem?"
Run your program from the command line, or by double-clicking.
You've been told this several times now.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://
.
I then went to another machine that has never had pythonWin on it all,
but does have python 2.5.2 with IDLE. I ran the same program there. W2K.
In both cases, I got the output below. Your conclusions?
That you haven't listened to a word anyone has said.
--
Rhodri James *-* Wildebeeste H
plit("(\w+)", "The quick brown fox jumps, and falls
over.")[1::2]
['The', 'quick', 'brown', 'fox', 'jumps', 'and', 'falls', 'over']
Using this code how would it load each word into a temporary var
igit, I can
easily find myself executing an earlier version, differing as Dev4, to
Dev5 at the end of each name.
I'd suggest spending a while reading up on version control systems.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, 14 Feb 2009 05:03:13 -, W. eWatson
wrote:
See my response to Scott. Thanks for your reply.
I did. It was fundamentally mistaken in so many respects that
I formally give up on you.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo
cur to me...
What do you recommend?
It rather depends on what the files are. Some (clearly not this) will
be best coded as absolute paths. Probably your best bet otherwise is
to set an environment variable outside Python to point to the appropriate
directory, and read it out of the os.e
this is to gratuitously
subclass Test:
class AcceptableTest(object):
pass
class Test(AcceptableTest):
@accepts(int, AcceptableTest)
def check(self, obj):
print obj
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
ing, "pretty" and "clever" will not be the words you are using. Trust
me on this one.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
al.
Caveat: 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 to
sing, 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
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 a
python-list
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 th
as to make it clear why it wasn't 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
'list'? You try assigning '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
nd nothing else, so you don't have to worry about
losing
leading or trailing spaces if those are important to you.
... and it's so hard to write
item = item[:-1]
Tsk. That would be "chop". "chomp" would be
if item[-1] == '\n':
item = i
On Thu, 11 Dec 2008 23:49:10 -, John Machin
wrote:
On Dec 12, 10:31 am, "Rhodri James"
wrote:
On Thu, 11 Dec 2008 19:49:23 -, Steve Holden
wrote:
> ... and it's so hard to write
> item = item[:-1]
Tsk. That would be "chop". "chom
ctory 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
|self| in |b| is still in lexical scope, though.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
avoiding using IDLE's "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
m 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 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 *-* Wildebeest
nd __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
n. 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
bject into a labelled
box" model when 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
kind of secured protocol instead?
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
le it:
sys.path.append("C:\\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 gu
Files\test"
"\P" isn't a valid escape sequence, so it doesn't get replaced. "\t"
represents a tab, so it does.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
On Tue, 24 Feb 2009 00:26:29 -, bvdp wrote:
So, in this case I'm assuming that the interpreter is converting the
escapes on assignment.
The compiler converts the escapes on creating its internal
representation of the string, before assignment ever gets
involved.
--
Rhodri
ill) speak English (of a kind).
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
what you write in the rest of the code. In this case you
call your input string "items", but then say "Join all the
strings in *stringList*..."
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
d
be done 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
d 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
--
unc(foo)# 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
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
lly wise, and I'm failing. 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
T /msg:hello ' + vBS)
Your problem is that vBS has a space in it, so the Windows
command interpreter is interpreting it as two separate arguments,
r"C:\Program" and r"Files\nasa\nmail.vbs".
Gabriel has already posted two solutions (which I won't repeat),
but he forg
x(ord(b))
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
wrote:
Rhodri James wrote:
On Wed, 04 Mar 2009 22:58:38 -, vibgyorbits
wrote:
I'm writing a tool to do some binary file comparisons.
I'm opening the file using
fd=open(filename,'rb')
# Need to seek to 0x80
n 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 lis
= (n is not None) and (n != [])
The second comparison isn't actually necessary, since an
empty list is True and a non-empty one False.
b = (n is not None) and n
Putting the comparison in does make the code slightly less
"magic", though, so it's not a bad idea to
On Sat, 07 Mar 2009 05:03:08 -, Grant Edwards wrote:
On 2009-03-07, Rhodri James wrote:
On Fri, 06 Mar 2009 15:34:08 -, Grant Edwards
wrote:
On 2009-03-06, Fencer wrote:
Hi, I need a boolean b to be true if the variable n is not
None and not an empty list, otherwise b should
g to prove anything. Now if
you were to show us a line like "something = dialog.body(something_else)"
then you might be onto something, but personally I 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
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 full
ending "\\?\"
Tim's point was that you should read the MS documentation. To be fair 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 *-* Wildebe
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
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,
but
On Fri, 13 Mar 2009 15:33:26 -, MRAB
wrote:
Rhodri James wrote:
On Fri, 13 Mar 2009 14:49:17 -, Beni Cherniavsky
wrote:
Specification
=
Allow keyword arguments in function call to take this form:
NAME ( ARGUMENTS ) = EXPRESSION
which is equivallent to the
ht, 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
wrote:
"Rhodri James" 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 to understand this subtlety to know why
'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("my number is {0:10n:financial}".format(1234567))
It's hard to think of a way of exten
stance" there :-) Actually what I want is for
the attribute to be stored where I told it, which could 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
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
wrote:
On Mar 15, 1:50 pm, "Rhodri James"
wrote:
On Sun, 15 Mar 2009 17:55:25 -, Aaron Brady
wrote:
> On Mar 15, 12:39 pm, John Posner wrote:
>> (My apologies if the thread has already covered this.) I believe I
this, but how about:
print("my number 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 thin
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 y
local locales (!) wouldn't be so hard later on.
Anyway, time I stopped hypothesising about locales and started looking at
the actual code-base, methinks.
--
Rhodri James *-* Wildebeeste Herder to the Masses
--
http://mail.python.org/mailman/listinfo/python-list
401 - 500 of 855 matches
Mail list logo