Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
'class' attribute for 'find' and 'find_all' functions
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Pavel Potoček  
View profile  
 More options Aug 15 2012, 3:44 am
From: Pavel Potoček <pavelpoto...@gmail.com>
Date: Wed, 15 Aug 2012 00:44:50 -0700 (PDT)
Local: Wed, Aug 15 2012 3:44 am
Subject: 'class' attribute for 'find' and 'find_all' functions

Hello, the 'class' name collision is now solved in weird ways. According to
PEP-0008, whenever a name-collision with a keyword occurs, devs are
encouraged to use trailing underline: Tkinter.Toplevel(master,
class_='ClassName').

This syntax: soup.findAll('a', class_='ahoj') is nice, compared tosoup.findAll('a', {'class', 'ahoj'}) and
self-explanatory, compared to soup.findAll('a', 'ahoj') . The collision
with existing functionality could be an issue (?). Any class_="ahoj"attribute would cease to function (but does the internet contain anything
like this?:) IDK. IMO better to use dict in those cases (0.001%) than in '
class' cases (~50%).. ) What do U experienced-devs think about it? :-)

 http://www.python.org/dev/peps/pep-0008/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »