to "catch this single thing composed of three exception
types".
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
On Jan 30, 2012, at 12:56 PM, Aaron wrote:
> On 01/30/2012 06:41 PM, Charles Yeomans wrote:
>> To catch more than one exception type in an except block, one writes
>>
>> except (A, B, C) as e:
>>
>> I'm wondering why it was decided to match tuples, but n
On Jan 30, 2012, at 7:00 PM, Steven D'Aprano wrote:
> On Mon, 30 Jan 2012 12:41:00 -0500, Charles Yeomans wrote:
>
>> To catch more than one exception type in an except block, one writes
>>
>> except (A, B, C) as e:
>>
>> I'm wondering why
On Jan 31, 2012, at 9:51 AM, Steven D'Aprano wrote:
> On Tue, 31 Jan 2012 08:57:31 -0500, Charles Yeomans wrote:
>
>> I don't think of a tuple as a container, and I don't think it a
>> misunderstanding on my part to think this.
>
> Well, it is a misunder
On Jan 31, 2012, at 11:38 AM, Devin Jeanpierre wrote:
> On Tue, Jan 31, 2012 at 11:23 AM, Charles Yeomans
> wrote:
>>
>> On Jan 31, 2012, at 9:51 AM, Steven D'Aprano wrote:
>>
>>> On Tue, 31 Jan 2012 08:57:31 -0500, Charles Yeomans wrote:
>>>
&g
On Jan 31, 2012, at 8:24 AM, Mel Wilson wrote:
> Charles Yeomans wrote:
>
>> To catch more than one exception type in an except block, one writes
>>
>> except (A, B, C) as e:
>>
>> I'm wondering why it was decided to match tuples, but not lists:
>&g
On Jan 31, 2012, at 7:12 PM, Terry Reedy wrote:
> On 1/31/2012 8:57 AM, Charles Yeomans wrote:
>
>> In any case, though I appreciate your attempt at a post hoc justification,
> > I was hoping for a positive explanation.
>
> I think the best you are going to get
I am so far unable to find the information I want about the Exception
class. Information like the signature of __init__ seems to be
unavailable. Any suggestions where I might find such information?
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
On Feb 5, 2010, at 2:13 PM, Gerald Britton wrote:
On Fri, Feb 5, 2010 at 12:55 PM, Charles Yeomans > wrote:
I am so far unable to find the information I want about the
Exception class.
Information like the signature of __init__ seems to be
unavailable. Any
suggestions where I might f
On Feb 6, 2010, at 8:09 AM, Gerald Britton wrote:
If you browse the Python source tree, you should be able to find it.
http://svn.python.org/view/python/trunk/Objects/exceptions.c?revision=77045&view=markup
Perfect (even if I have to read C). Thanks.
Charles Yeomans
--
he meaning of this:
if a in (1,2,3):
Actually, I might be -- I think of a tuple first as a single thing, as
opposed to a list or map, which I see first as a collection of other
things.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
uniformly. On a closed interval,
any continuous function is uniformly continuous.
Isn't (-∞, ∞) closed?
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
ider this practice to be kludgy; my
experience with RAII is pretty good.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 17, 2009, at 9:43 PM, Steven D'Aprano wrote:
On Wed, 17 Jun 2009 07:49:52 -0400, Charles Yeomans wrote:
Even CPython doesn't rely completely on reference counting (it has a
fallback gc for cyclic garbage). Python introduced the "with"
statement to get away fro
On Jun 18, 2009, at 2:19 PM, David C. Ullrich wrote:
On Wed, 17 Jun 2009 07:37:32 -0400, Charles Yeomans
wrote:
On Jun 17, 2009, at 2:04 AM, Paul Rubin wrote:
Jaime Fernandez del Rio writes:
I am pretty sure that a continuous sequence of
curves that converges to a continuous curve
atters, but his defintion of "polygonal path"
is, _if_ we're being very careful, self-contradictory.
So I don't think we can count that paper as a suitable
reference for what the _standard_ definitions are;
the standard definitions are not self-contradictory this way.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
ation.
Ie, a curve in the plane _is_ a continuous function from
an interval to the plane, and a subset of the plane is
not a curve.
Officially, anyway.
This simply isn't true.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
On Jun 22, 2009, at 8:46 AM, pdpi wrote:
On Jun 19, 8:13 pm, Charles Yeomans wrote:
On Jun 19, 2009, at 2:43 PM, David C. Ullrich wrote:
Hmm. You left out a bit in the first definition you cite:
"A simple closed curve J, also called a Jordan curve, is the image
of a continuou
On Jun 22, 2009, at 2:16 PM, David C. Ullrich wrote:
On Mon, 22 Jun 2009 10:31:26 -0400, Charles Yeomans
wrote:
On Jun 22, 2009, at 8:46 AM, pdpi wrote:
On Jun 19, 8:13 pm, Charles Yeomans wrote:
On Jun 19, 2009, at 2:43 PM, David C. Ullrich wrote:
Hmm. You left out a bit in the
Or you could try my approach and write your own web app.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
is always evolving and there might be new tutorials out
there.
As an alternative to Python, I'd suggest REALbasic. Its main
disadvantage is that it is not free. But you get a language, editor,
and two application frameworks in one package.
Charles Yeomans
--
http://mail.python.org/mailman/
On Jun 29, 2009, at 7:28 AM, Elf Scripter wrote:
Hi, i have a console application that i want to ran (invisible) as a
daemon, how can i do that?
Search the web for python + daemon. I found plenty of code, including
mostly prewritten solutions, for my own work.
Charles Yemans
--
http:/
ord: ")
guess = str(guess)
if guess != password:
print "Access Denied"
attemptcount = attemptcount + 1
else:
print "Password Confirmed"
correct_password_given = True
break
Charles Yeomans
On Jul 1, 2009, at 3:58 AM, sato.ph...@gmail.com wro
, MD5 was intended to be a cryptographic hash function,
not a checksum.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
I figured some sort of HTTP event / RPC type of would
be a good idea?
Are there any modules I should know about, or guidelines I could
read, that could aid me in the design of the API?
Thank you,
:)
I'd suggest the O'Reilly book "RESTful Web Services".
Cha
code as data sanitizing, but rather as a precondition. And with that
description, the use of an assert statement that might be compiled
away is not unreasonable; indeed, it certainly is so in the context of
design by contract.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
remove the first occurence. Doing that while no exception is
raised is also uncool, right?
Some suggestions?
L = [0, 0, 0, 1, 1, 1, 0]
M = [x for x in L if x !=0]
Charles Yeomans--
http://mail.python.org/mailman/listinfo/python-list
for enforcing pre-conditions and
post-
conditions, unless such conditions are mere "guidelines", because
assert
can be switched off at runtime.
Unless, of course, you want to switch off such checking at runtime, as
you might when using a design-by-contract approach.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
the input/output of
functions; on the contrary, Bertrand Meyer, the inventor of DbC,
claims that DbC allows one to eliminate such redundancy, and the
resulting overhead.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
On Aug 14, 2009, at 12:09 AM, Scott David Daniels wrote:
Charles Yeomans wrote:
On Aug 11, 2009, at 3:30 PM, Ethan Furman wrote:
Ethan Furman wrote:
Greetings!
I have seen posts about the assert statement and PbC (or maybe it
was DbC), and I just took a very brief look at pycontract (http
sorts
of functions and types (strictly "categories") they can accept,
presumably to make them mathematically well-behaved.
Have I got it correct?
I don't think so. Paul Rubin's square example was, I thought,
particularly instructive.
Charles Yeomans--
http://mail.python.org/mailman/listinfo/python-list
faster all the time and languages like python or ruby are fast
enough.
any comment ?
Many developers suffer from performance anxiety.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
nally:
f = f.close()
In addition to fixing the latent bug in the second simple template, I
took the opportunity to correct your heinous violation of command-
query separation.
Charles Yeomans
--
http://mail.python.org/mailman/listinfo/python-list
33 matches
Mail list logo