unpickle from URL problem

2007-10-09 Thread Alan Isaac
change the filetype to unix. I upload again. I try to unpickle from the URL. Now it works. Try it: x1, x2 = pickle.load(urllib.urlopen('http://www.american.edu/econ/notes/hw/example2')) Why the difference? Thank you, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: unpickle from URL problem

2007-10-10 Thread Alan Isaac
Marc 'BlackJack' Rintsch wrote: > Pickles are *binary* files, not text files Actually not: http://docs.python.org/lib/node316.html These were created with protocol 0. But my question is about the different outcomes I observed. Thank you, Alan Isaac -- http://mail.python.org/mai

Re: unpickle from URL problem

2007-10-10 Thread Alan Isaac
ects for an exercise, and I need not to worry about their directory structure.) Can you explain the differences I see? Thank you, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: unpickle from URL problem

2007-10-10 Thread Alan Isaac
is also unpickles just fine on my machine, but in addition the urllib download of this file unpickles just fine. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Can I overload the compare (cmp()) function for a Lists ([]) index function?

2007-10-10 Thread alan . haffner
x27;bar', 'baz'].index(Cmp('Bar', mycmp)) > 1 > >>> ['foo', 'bar', 'baz'].index(Cmp('nosuchelement', mycmp)) > > Traceback (most recent call last): > File "", line 1, in > ValueError: list.

Re: tarfile...bug?

2007-10-12 Thread alan . haffner
o what is the diff. between tar.members and tar.getmembers() > > rgds > Anurag if you are not fully dependant on tarfiles, have a look at the zipfile library in Python. Everytime I start to use the tarfile .lib, the zip .lib turns out to be a better solution. Cheers, --Alan -- http://mai

Re: Hiding tracebacks from end-users

2007-10-23 Thread Alan Meyer
t is otherwise lost when a non-expert user hits the exception. For intermittent bugs that are hard to reproduce, this can be a lifesaver - especially when your favorite non-expert user seems to have a knack for generating errors that you can't figure out how to create ;-) Alan -- http://m

Re: Python and Combinatorics

2007-10-25 Thread Alan Isaac
none wrote: > Is there some package to calculate combinatorical stuff like (n over > k), i.e., n!/(k!(n - k!) ? Yes, in SciPy. Alan Isaac >>> from scipy.misc.common import comb >>> help(comb) Help on function comb in module scipy.misc.common: comb(N, k, exact=

simple try/except question

2007-10-29 Thread Alan Isaac
Is the behavior below expected? If so, why is the exception not caught? Thanks, Alan Isaac >>> x,y='','' >>> try: x/y ... except TypeError: print 'oops' ... Traceback (most recent call last): File "", line 1, in TypeError: u

Re: simple try/except question

2007-10-29 Thread Alan Isaac
Tim Chase wrote: > It works for me(tm)... > Python 2.4.3 Sorry to have left out that detail. Yes, it works for me in Python 2.4, but not in 2.5.1. The code I posted was copyied from the interpreter. Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: simple try/except question

2007-10-29 Thread Alan Isaac
False alarm. Fresh start of interpreter and all is well. Apologies. Still tracking. Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: simple try/except question

2007-10-29 Thread Alan Isaac
Gabriel Genellina wrote: > Perhaps you reassigned TypeError? Yes, that was it. Sheesh. Thanks! Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: interesting threading result..

2007-10-29 Thread Alan Franzoni
would expect: {2: 3, 3: 4} [{2: 3, 3: 4}] -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3E -- http://mail.python.org/mailman/listinfo/python-list

Re: generate tuples from sequence

2007-01-17 Thread Alan Isaac
dependent: http://mail.python.org/pipermail/python-list/2005-February/307550.html Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

stop script w/o exiting interpreter

2007-01-25 Thread Alan Isaac
point - comment out the last half I do not like these and assume that I have overlooked the obvious. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: stop script w/o exiting interpreter

2007-01-27 Thread Alan Isaac
my very simple goal Note that I can just put the undefined name ``stop`` on any line I want, and the script will stop execucting at that line and will return to the interactive interpreter, as I wish. It is just that it returns with an error message, and I'd like to avoid that. Than

Re: Ubunu - Linux - Unicode - encoding

2007-02-01 Thread Alan Franzoni
xp may be installed on fat32 or ntfs partitions) and b) which driver are you using to read that partition (may be vfat, ntfs or fuse/ntfs-3g) and, last but not least, c) which options are passed to that driver? -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattar

Re: Ubunu - Linux - Unicode - encoding

2007-02-01 Thread Alan Franzoni
. Try appending this options in your fstab as hda1 mount options: iocharset=iso8859-15 unmount & remount and check what does happen. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerpr

randomly generate n of each of two types

2007-02-11 Thread Alan Isaac
else: next_type = type1 ct1 += 1 yield next_type Does this seem a good way to go? Comments welcome. Thank you, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: randomly generate n of each of two types

2007-02-11 Thread Alan Isaac
the possible shuffles of a large list, but I doubt this is easily evaded.) So as far as I can tell, this is the same approach as the original (first) solution. Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: randomly generate n of each of two types

2007-02-12 Thread Alan Isaac
ink it needs a cast to a float: Mea culpa. I **always** import division from __future__ and tend to assume everyone else does too. Thanks, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: The Python interactive interpreter has no command history

2007-02-16 Thread Alan Franzoni
s well both with 2.4 and 2.5 with my config. If it's really an Edgy glitch, it must be configuration-related! -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E):

PLY for standard library

2007-02-20 Thread Alan Isaac
Is PLY destined for the standard library? If not, what module providing substantially similar functionality is? Thank you, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: builtin set literal

2007-02-20 Thread Alan Isaac
oh, that must be tuple(tuple((1,2,3))), no wait ... Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

design question: no new attributes

2007-02-26 Thread Alan Isaac
I have a class whose instances should only receive attribute assignments for attributes that were created at inititialization. If slots are not appropriate, what is the Pythonic design for this? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: design question: no new attributes

2007-02-26 Thread Alan Isaac
omeone tries to set a value for a nonexisting attribute. This is especially true if there have been any interface changes. So my question remains: how best to trap any such attempt subsequent to object initialization? (I am willing to have properties for all data attributes, if that helps.) Thank

Re: gtk.mainquit is deprecated

2007-02-27 Thread Alan Franzoni
; Very strange. But does then the application end, as if gtk.main_quit() were called? If it's the case, it's very likely you connected the 'destroy' signal on that very window and you set gtk.mainquit() as the callback. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .

Re: Python Source Code Beautifier

2007-02-27 Thread Alan Franzoni
; => if not string That's impossibile! Python is dynamically typed! How could the 'beautifier' understand what the 'string' name is bound to? It could be whatever object! > detect mixed line ending > detect tabs mixed with space > trim trailing whitespaces. Th

Re: design question: no new attributes

2007-02-27 Thread Alan Isaac
id so!" But this prevents setting attributes during initialization, so it does not meet the spec. Cheers, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: design question: no new attributes

2007-02-27 Thread Alan Isaac
during initialization, right? I want that restriction only after an object is initialized. (I realize that I could condition on an attribute set during initialization, but I am asking for the most elegant way to achieve this.) Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: design question: no new attributes

2007-02-27 Thread Alan Isaac
an keep it. Anyone who wants to add stuff to an object just has to delete its "initialized" attribute. Anyone who want other behavior defined in this or a derived class can just override __init__. Does this address most of the (oddly passionate) objections? Thanks, Alan Isaac -- http://mai

Re: design question: no new attributes

2007-02-28 Thread Alan Isaac
is restriction will serve as a reasonable error check, and the design I offered allows very easy removal of the restriction in the future. Say, once I have written adequate unit tests. Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: design question: no new attributes

2007-02-28 Thread Alan Isaac
s about "why" here: http://mail.python.org/pipermail/python-list/2007-February/428651.html fwiw, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Python Source Code Beautifier

2007-02-28 Thread Alan Franzoni
Il Wed, 28 Feb 2007 07:53:47 +1100, Delaney, Timothy (Tim) ha scritto: > Alan Franzoni wrote: >> the += operator is syntactic sugar just to save time... if one >> doesn't use it I don't think it's a matter of beauty. > > This change can have semantic differ

Re: Python Source Code Beautifier

2007-02-28 Thread Alan Franzoni
a = a + [2] >>>> a > [1, 2] >>>> b > [1] This is a really nasty one! I just answered to Tim above here, and then I saw your example... I had never realized that kind of list behaviour. That's probably because i never use + and += on lists (i prefer the more explicit

Re: Eric on XP for Newbie

2007-02-28 Thread Alan Franzoni
N.B: you need first to install python, then pyqtgpl, then eric. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Fingerprint (Key ID = FE068F3E): 5C77 9DC3 BD5B 3A28 E7BC 921A 0255 42AA FE06 8F3

Re: design question: no new attributes

2007-03-01 Thread Alan Isaac
onvenient when doing something "quick and dirty", but I have never wanted it as a design feature in a more serious project. Can you give me an example where design considerations make dynamic attribute creation particularly desirable? Thank you, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: design question: no new attributes

2007-03-01 Thread Alan Isaac
"greg" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > There's a problem with that when you want to subclass: Agreed. The following addresses that and, I think, some of the other objections that have been raised. Alan class Lockable: a = 0 def _

Re: design question: no new attributes

2007-03-01 Thread Alan Isaac
tes to class instances is useful, I must note that everyone who responded agreed that it has been a source of bugs. This seems to argue against a general ban on "locking" objects in some way, in some circumstances. Thanks! Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Python iPod challenge

2007-11-11 Thread Alan Franzoni
letters as the output (this should be related to scripteaze problem) without any other character. Error messages are pretty counter-intuitive. -- Alan Franzoni <[EMAIL PROTECTED]> - Togli .xyz dalla mia email per contattarmi. Remove .xyz from my address in order to contact me. - GPG Key Finge

List problem

2007-12-16 Thread Alan Bromborsky
I wish to create a list of empty lists and then put something in one of the empty lists. Below is what I tried, but instead of appending 1 to a[2] it was appended to all the sub-lists in a. What am I doing wrong? a = 6*[[]] >>> a [[], [], [], [], [], []] >>> a[2].append(1) >>> a [[1], [1],

Re: Queue can result in nested monitor deadlock

2006-04-17 Thread Alan Morgan
(or, at the very least, don't have that global lock taken when you read from the queue). 2. Don't use a syncronized queue. If the only access to the queue is through the object and the object is protected then you don't need a synchronized queue. Alan -- Defendit numerus -- http://mail.python.org/mailman/listinfo/python-list

Re: Proposal for new operators to python that add syntactic sugar for hierarcical data.

2006-05-18 Thread Alan Kennedy
tag." ], tags.div(style="color: blue; width: 200px; background-color: yellow;") [ "And this is a coloured div." ] ] ] That looks nice and simple, and no need to destroy the elegance of python to do it. regards, -- alan kennedy

pairs from a list

2008-01-21 Thread Alan Isaac
, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: pairs from a list

2008-01-22 Thread Alan Isaac
I suppose my question should have been, is there an obviously faster way? Anyway, of the four ways below, the first is substantially fastest. Is there an obvious reason why? Thanks, Alan Isaac PS My understanding is that the behavior of the last is implementation dependent and not guaranteed

Re: pairs from a list

2008-01-22 Thread Alan Isaac
http://bugs.python.org/issue1121416> fwiw, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: pairs from a list

2008-01-22 Thread Alan Isaac
Arnaud Delobelle wrote: > pairs4 wins. Oops. I see a smaller difference, but yes, pairs4 wins. Alan Isaac import time from itertools import islice, izip x = range(51) def pairs1(x): return izip(islice(x,0,None,2),islice(x,1,None,2)) def pairs2(x): xiter = iter(x) while T

Re: basic output question

2008-01-25 Thread Alan Isaac
John Deas wrote: > My problem is that f.read() outputs nothing Since ``open`` did not give you an IOError, you did get a handle to the files, so this suggests that the files you read are empty... Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: find minimum associated values

2008-01-25 Thread Alan Isaac
[EMAIL PROTECTED] wrote: > I'd use the first solution. It can be speeded up a bit with a try/except: for k,v in kv: try: if d[k] > v: d[k] = v except KeyError: d[k] = v Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: find minimum associated values

2008-01-25 Thread Alan Isaac
Alan Isaac wrote: > #sort by id and then value > kv_sorted = sorted(kv, key=lambda x: (id(x[0]),x[1])) > #groupby: first element in each group is object and its min value > d =dict( g.next() for k,g in groupby( kv_sorted, key=lambda x: x[0] ) ) > > Yes, that appears to

Re: find minimum associated values

2008-01-25 Thread Alan Isaac
Steven Bethard wrote: > [3rd approach] Seems "pretty" enough to me. ;-) I find it most attractive of the lot. But its costs would rise if the number of values per object were large. Anyway, I basically agree. Thanks, Alan -- http://mail.python.org/mailman/listinfo/python-list

Windows issue -- method to control generation of bytecode files

2008-01-25 Thread Alan Nichols
this issue? Skip Montonaro raised a suggestion in 2003 (PEP304) that looked promising but it never generated much interest. Thank you for your help, Alan Nichols -- http://mail.python.org/mailman/listinfo/python-list

find minimum associated values

2008-01-25 Thread Alan Isaac
I have a small set of objects associated with a larger set of values, and I want to map each object to its minimum associated value. The solutions below work, but I would like to see prettier solutions... Thank you, Alan Isaac

Re: find minimum associated values

2008-01-25 Thread Alan Isaac
t( g.next() for k,g in groupby( kv_sorted, key=lambda x: x[0] ) ) Yes, that appears to be fastest and is pretty easy to read. Thanks, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Traversing python datatypes via http

2008-02-05 Thread Alan Gauld
e a set of indices that will allow you to iterate by more unusual step sizes And you can use normal indexing to go to the first element(0) or the last element(-1) I'm not sure if that answers your question. -- Alan Gauld Author of the Learn to Program web site http://www.freenetpage

python beginner problem(?)

2008-02-06 Thread Alan Illeman
= DiveIntoPython example 2.1 result: server=mpilgrim;uid=sa;database=master;pwd=secret ..which I realise is essentially the same (except for order). I haven't ever (not that I remember) installed MFC. Help! tia Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: python beginner problem(?)

2008-02-07 Thread Alan Illeman
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Steve Holden wrote: > > Alan Illeman wrote: > >> Win2k Pro - installed python: ok > >> > [...] > >> = > >>

Re: python beginner problem(?)

2008-02-07 Thread Alan Illeman
"Steve Holden" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Alan Illeman wrote: > > > > Thanks Steve for both your replies. > > Was (or is) python a piggyback for MFC? > > > > > You are supposed to be able to access the MFC clas

asynchronous alarm

2008-02-23 Thread Alan Isaac
or a variable that can be set by a button push? (Sounds plausible etc.) Solution G2 (gui): start alarm but somehow let Tkinter listen for an event without programming any threads. Possible?? Thanks, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: asynchronous alarm

2008-02-24 Thread Alan Isaac
Paul Rubin wrote: > a = Event() > Thread(target=f, args=(a,)).start() > raw_input('hit return when done: ') > a.set() Simple and elegant. Thank you. Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: Pythons & Ladders

2008-02-28 Thread Alan Isaac
when I last used it, some tinkering was required. You could work on adding features. http://docutils.sourceforge.net/sandbox/rst2wordml/readme.html If you get good enough a docutils, provide an option to have the number for the note be superscripted, like the note reference can be. fwiw, Alan

Re: more pythonic

2008-02-29 Thread Alan Isaac
alent generator expressions: someNewList = list( elementDerivedFrom(smthg) for smthg in someSequence if condition(smthg) ) Tastes vary of course. Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: tuples, index method, Python's design

2008-03-02 Thread Alan Isaac
On April 12th, 2007 at 10:05 PM Alan Isaac wrote: > The avoidance of tuples, so carefully defended in other > terms, is often rooted (I claim) in habits formed from > need for list methods like ``index`` and ``count``. > Indeed, I predict that Python tuples will eventually ha

Re: tuples, index method, Python's design

2008-03-02 Thread Alan Isaac
Paul Boddie wrote: > Here's the tracker item that may have made it happen: > http://bugs.python.org/issue1696444 > I think you need to thank Raymond Hettinger for championing the > cause. ;-) Yes indeed! Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: Is it possible to return a variable and use it...?

2008-03-03 Thread Alan Isaac
Nathan Pinno wrote: > Is it possible to return a variable and then use it I think you are asking about the ``global`` statement. http://docs.python.org/ref/global.html> > like the following: Presumably not. ;-) Cheers, Alan Isaac -- http://mail.python.org/mailman/listin

Re: Can't get items out of a set?

2008-03-08 Thread Alan Isaac
Cruxic wrote: > people = set( [Person(1, 'Joe'), Person(2, 'Sue')] ) > ... > p = people.get_equivalent(2) #method doesn't exist as far as I know > print p.name #prints Sue def get_equivalent(test, container): for p in container: if p == test

no more comparisons

2008-03-12 Thread Alan Isaac
/pipermail/python-3000/2008-January/011764.html Is that going anywhere? Also, what is the core motivation for removing this functionality? Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: no more comparisons

2008-03-12 Thread Alan Isaac
gestion to use ``key``: this is already possible when it is convenient, but it is not always convenient. (Even aside from memory considerations.) By the way, I even saw mention of even removing the ``cmp`` built-in. Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: no more comparisons

2008-03-13 Thread Alan Isaac
27;m overlooking something obvious ... how is this supposed to work if __cmp__ is no longer being called? (Which was my understanding.) Thank you, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: no more comparisons

2008-03-13 Thread Alan Isaac
>> Dan Bishop wrote: >>> def cmp_key(cmp_fn): >>>class CmpWrapper(object): >>>def __init__(self, obj): >>>self.obj = obj >>>def __cmp__(self, other): >>>return cmp_fn(self.obj, other.obj)

Re: no more comparisons

2008-03-13 Thread Alan Isaac
1 for > negative) and i is a string representing the absolute > value of the integer. So Does this do it? :: key= lambda x: (-x[1],int(x2)) Here I am depending on the lexicographic sorting of tuples. Without that there would be real trouble. Cheers, Alan Isaac

Re: no more comparisons

2008-03-13 Thread Alan Isaac
case that is really uncomfortable? Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: method to create class property

2008-03-18 Thread Alan Isaac
value): self._value = value Cheers, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

Re: is it possible to add a property to an instance?

2009-02-20 Thread Alan Isaac
Attributes are data attributes or callable attributes. Data attributes are variables or properties. Callable attributes are usually method attributes. This seemed about right to me, but a better (or "official") taxonomy would be welcome. Thanks, Alan Isaac -- http://mail.python.org/mailman/listinfo/python-list

function factory question: embed current values of object attributes

2009-02-20 Thread Alan Isaac
the time it is manufactured). I do not care if this function is attached to `x` or not. I have a feeling that I am turning something simple into something complex, perhaps for lack of an afternoon coffee or lack of CS training. Suggestions appreciated. Alan Isaac -- http://mail.python.org

Re: function factory question: embed current values of object attributes

2009-02-21 Thread Alan Isaac
Terry Reedy wrote: You are now describing a function closure. Here is an example that might help. It does. Thanks, Alan -- http://mail.python.org/mailman/listinfo/python-list

Re: function factory question: embed current values of object attributes

2009-02-21 Thread Alan Isaac
Gabriel Genellina wrote: If you want a "frozen" function (that is, a function already set-up with the parameters taken from the current values of x.a, x.b) use functools.partial: OK, that's also a nice idea. Thanks! Alan -- http://mail.python.org/mailman/listinfo/python-list

Start learning 2.6 or wait for 3.0?

2008-11-24 Thread Alan Biddle
I am planning on learning Python, primarily for my own interest, rather than any immediate need. I am wondering whether I would be wasting my time to start with the latest 2.6 version which has a lot of good instructional material, or wait a bit for version 3.0? -- Alan -- http

ONLINE EARNINGS $$$ 500 - $$$ 1000 PER MONTH WITHOUT INVESTMENT...

2008-11-26 Thread alan wells
ONLINE EARNINGS $$$ 500 - $$$ 1000 PER MONTH WITHOUT INVESTMENT... projectpayday has been proven to a legit source of income that can be earned the same day you sign up.the best programme i found in online that it pays more than $100 perday to me. they provides you step by step guide untill than y

Python extension: callbacks blocked when holding button down

2008-12-12 Thread alan . chambers
I'm developing a Python extension. It's a wrapper for some firmware, and simulates the target hardware environment. I'm using wxPython. I pass a function to the extension so it can let Python know about certain events. The code is currently single threaded. My problem is that the callback seems to

Re: [Tutor] Having Issues with CMD and the 'python' command

2008-12-15 Thread Alan Gauld
eak stuff and its not easy to fix it afterwards unless you have a full backup to hand!! Alan G. -- http://mail.python.org/mailman/listinfo/python-list

Re: time

2008-10-07 Thread Alan Franzoni
;t see your IP since I'm reading this through gmane and you appear to have posted via the python ml, but if your utc+1 means "Central Europe" , you're proably missing the daylight saving. 17.00 CEST is 15.00 UTC during summer, when daylight saving is employed. -- Alan Franzoni <

Re: Finding the instance reference of an object

2008-10-27 Thread Douglas Alan
Steven D'Aprano <[EMAIL PROTECTED]> writes: > I understand that Python's object and calling semantics are exactly the > same as Emerald (and likely other languages as well), and that both > Emerald and Python are explicitly based on those of CLU, as described by > by Barbara Liskov in 1979: > >

Re: Finding the instance reference of an object

2008-10-27 Thread Douglas Alan
greg <[EMAIL PROTECTED]> writes: > Seems to me that (1) describes exactly how parameter passing > works in Python. So why insist that it's *not* call by value? Because there's an important distinction to be made, and the distinction has been written up in the Computer Science literature since Lis

Re: Finding the instance reference of an object

2008-10-28 Thread Douglas Alan
Joe Strout <[EMAIL PROTECTED]> writes: > There are only the two cases, which Greg quite succinctly and > accurately described above. One is by value, the other is by > reference. Python quite clearly uses by value. You make a grave error in asserting that there are only two cases. Algol, for in

Re: Finding the instance reference of an object

2008-10-30 Thread Douglas Alan
greg <[EMAIL PROTECTED]> writes: > Douglas Alan wrote: >> greg <[EMAIL PROTECTED]> writes: >> >>>Seems to me that (1) describes exactly how parameter passing >>>works in Python. So why insist that it's *not* call by value? >> Beca

Re: Finding the instance reference of an object

2008-10-31 Thread Douglas Alan
greg <[EMAIL PROTECTED]> writes: > Douglas Alan wrote: >> greg <[EMAIL PROTECTED]> writes: > >>> This holds for *all* languages that I know about, both static and >>> dynamic. > >> Then you don't know about all that many languages. There ar

Re: Finding the instance reference of an object

2008-11-07 Thread Douglas Alan
Joe Strout <[EMAIL PROTECTED]> writes: > As for where I get my definitions from, I draw from several sources: > > 1. Dead-tree textbooks You've been reading the wrong textbooks. Read Liskov -- she's called CLU (and hence Python's) calling strategy "call-by-sharing" since the 70s. > 2. Wikipedia

Re: Finding the instance reference of an object

2008-11-07 Thread Douglas Alan
Joe Strout <[EMAIL PROTECTED]> writes: > Yes, OK, that's great. But there are several standard pass-by- > somethings that are defined by the CS community, and which are simple > and clear and apply to a wide variety of languages. "Pass by object" > isn't one of them. "Call-by-sharing" *is* one

unittest exits

2008-11-13 Thread Alan Baljeu
When I call unittest.main(), it invokes sys.exit(). I would like to run tests without exiting. How can I? Alan Baljeu __ Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at

Installing packages

2008-11-13 Thread Alan Baljeu
or Windows and Py2.6, so I think I can't use that. (It only does 2.5 and earlier. (Should I go to Py2.5? Is there more support out there for that?)). Alan Baljeu __ Ask a question on any topic and get answers from

embedding python

2008-11-13 Thread Alan Baljeu
an interactive console for this embedded python? I'd like to play with things while my app is running. - Original Message From: Diez B. Roggisch <[EMAIL PROTECTED]> To: python-list@python.org Sent: Thursday, November 13, 2008 2:41:03 PM Subject: Re: Installing packages

Re: Python IF THEN chain equivalence

2008-11-13 Thread Alan Baljeu
I think you should rethink your post. The first case you posted makes no sense in any language I know. Also, a whole lot of nested IF's is a bad idea in any language. In Python, you will end up with code indented 40+ characters if you keep going. - Original Message From: jzakiya <[

automatic reload

2008-11-14 Thread Alan Baljeu
ython interpreter (it's embedded) might be an option if (a) that's feasible within a process and (b) it's quick. Alan Baljeu http://www.collaborative-systems.org Intelligent software that works _with_ you. __

Fw: automatic reload

2008-11-14 Thread Alan Baljeu
Alan Baljeu http://www.collaborative-systems.org Intelligent software that works _with_ you. - Forwarded Message From: Alan Baljeu <[EMAIL PROTECTED]> To: Mike Driscoll <[EMAIL PROTECTED]> Sent: Friday, November 14, 2008 2:06:26 PM Subject: Re: automatic reload I t

Re: Finding the instance reference of an object

2008-11-19 Thread Douglas Alan
greg <[EMAIL PROTECTED]> writes: > Steven D'Aprano wrote: >> At least some sections of the Java community seem to prefer a >> misleading and confusing use of the word "value" over clarity and >> simplicity, but I for one do not agree with them. > I don't see anything inherently confusing or misl

Re: Finding the instance reference of an object

2008-11-19 Thread Douglas Alan
Joe Strout <[EMAIL PROTECTED]> writes: >> Q. What type of calling semantics do Python and Java use? >> >> A. Call-by-sharing. > > Fair enough, but if the questioner then says "WTF is call-by-sharing," > we should answer "call-by-sharing is the term we prefer for call-by- > value in the case wh

Re: Ban Xah Lee

2009-03-10 Thread Alan Mackenzie
That's wonderful, almost on a par with Sir Robert Armstrong's "being economical with the truth". :-) > Also, thanks to many supporters over the past years. Hey, you're not going away, are you? > Xah -- Alan Mackenzie (Nuremberg, Germany). -- http://mail.python.org/mailman/listinfo/python-list

PyCon Italy 2009: Early Bird Deadline

2009-04-07 Thread Alan Franzoni
Cangiano. Feel free to take a look at the schedule: http://www.pycon.it/pycon3/schedule/ A simultaneous interpretation service is available for the main track: http://www.pycon.it/pycon3/non-italians See you in Florence! -- Alan Franzoni - Remove .xyzz from my email in order to contact me. - GPG

PyCon Italy 2009: Early Bird Deadline

2009-04-07 Thread Alan Franzoni
Cangiano. Feel free to take a look at the schedule: http://www.pycon.it/pycon3/schedule/ A simultaneous interpretation service is available for the main track: http://www.pycon.it/pycon3/non-italians See you in Florence! -- Alan Franzoni - Remove .xyzz from my email in order to contact me. - GPG

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