Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support getattr as a find alias on Node? #7

Open
ChrisBeaumont opened this issue Apr 7, 2015 · 0 comments
Open

Support getattr as a find alias on Node? #7

ChrisBeaumont opened this issue Apr 7, 2015 · 0 comments

Comments

@ChrisBeaumont
Copy link
Owner

BS turns attribute getting into an alias for find

dom.a.b # == dom.find('a').find('b')

Soupy doesn't do this yet. The terseness is nice, but it has a few downsides:

  • It's another syntax for doing the same thing
  • You still need find for its extra args/kwargs support
  • It's possible that the name of a tag collides with another soupy method name, which will trip you up.

A few libraries do this (numpy recarrays, pandas), and I always have mixed feelings about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant