Monday, October 25, 2010

comp.lang.python - 4 new messages in 3 topics - digest

comp.lang.python
http://groups.google.com/group/comp.lang.python?hl=en

comp.lang.python@googlegroups.com

Today's topics:

* Unicode questions - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/000ed17bb89a0a65?hl=en
* HTMLParser not parsing whole html file - 1 messages, 1 author
http://groups.google.com/group/comp.lang.python/t/aae71c79bf6f9e4c?hl=en
* Exception Handling in Python 3 - 2 messages, 2 authors
http://groups.google.com/group/comp.lang.python/t/a525192b003ffa73?hl=en

==============================================================================
TOPIC: Unicode questions
http://groups.google.com/group/comp.lang.python/t/000ed17bb89a0a65?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Oct 24 2010 11:33 pm
From: Steve Holden


On 10/25/2010 1:42 AM, Lawrence D'Oliveiro wrote:
> In message <mailman.31.1287517442.2218.python-list@python.org>, Petite
> Abeille wrote:
>
>> Characters vs. Bytes
>
> And why do certain people insist on referring to bytes as "octets"?

Because back in the old days bytes were of varying sizes on different
architectures - indeed the DECSystem-10 and -20 had instructions that
could be parameterized as to byte size. So octet was an unambiguous term
for the (now standard) 8-bit byte.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/


==============================================================================
TOPIC: HTMLParser not parsing whole html file
http://groups.google.com/group/comp.lang.python/t/aae71c79bf6f9e4c?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Oct 24 2010 11:44 pm
From: Stefan Behnel


josh logan, 25.10.2010 04:14:
> I found the error. The HTML file I'm parsing has invalid HTML at line
> 193. It has something like:
>
> <a href="mystuff "class = "stuff">
>
> Note there is no space between the closing quote for the "href" tag
> and the class attribute. I guess I'll go through each file and correct
> these issues as I parse them.

HTMLparser is not made to deal with non-HTML input. You can take a look at
lxml.html or BeautifulSoup (up to 3.0), which handle these problems a lot
better.

Stefan


==============================================================================
TOPIC: Exception Handling in Python 3
http://groups.google.com/group/comp.lang.python/t/a525192b003ffa73?hl=en
==============================================================================

== 1 of 2 ==
Date: Sun, Oct 24 2010 11:57 pm
From: "Martin v. Loewis"


Am 24.10.2010 23:48, schrieb Steve Holden:
> On 10/24/2010 4:44 PM, John Nagle wrote:
>> Are exception semantics changing in a way which would affect that?
>
> No, I don't believe so. I simply felt that the traceback gives too much
> information in the case where an exception is specifically being raised
> to replace the one currently being handled.

I think you have puzzled readers a lot (including me) with the statement:

"that Python 3 no longer allows an exception to be raised in an except
clause"

That certainly isn't the case.

Regards,
Martin


== 2 of 2 ==
Date: Mon, Oct 25 2010 12:17 am
From: Steve Holden


On 10/25/2010 2:57 AM, Martin v. Loewis wrote:
> Am 24.10.2010 23:48, schrieb Steve Holden:
>> On 10/24/2010 4:44 PM, John Nagle wrote:
>>> Are exception semantics changing in a way which would affect
>>> that?
>>
>> No, I don't believe so. I simply felt that the traceback gives too
>> much information in the case where an exception is specifically
>> being raised to replace the one currently being handled.
>
> I think you have puzzled readers a lot (including me) with the
> statement:
>
> "that Python 3 no longer allows an exception to be raised in an
> except clause"
>
> That certainly isn't the case.
>
Of course it isn't. I believe the only readers puzzled by my assertion
would be those who did not read the parenthesized comment immediately
following the sentence you quoted, which read:

> (or rather that it reports it as a separate exception that occurred
> during the handling of the first)

I understand that this behavior is deliberate. I just don't feel that it
is universally helpful.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
PyCon 2011 Atlanta March 9-17 http://us.pycon.org/
See Python Video! http://python.mirocommunity.org/
Holden Web LLC http://www.holdenweb.com/

==============================================================================

You received this message because you are subscribed to the Google Groups "comp.lang.python"
group.

To post to this group, visit http://groups.google.com/group/comp.lang.python?hl=en

To unsubscribe from this group, send email to comp.lang.python+unsubscribe@googlegroups.com

To change the way you get mail from this group, visit:
http://groups.google.com/group/comp.lang.python/subscribe?hl=en

To report abuse, send email explaining the problem to abuse@googlegroups.com

==============================================================================
Google Groups: http://groups.google.com/?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate