Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Make table and db iterable#139

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
msiemens merged 2 commits intomsiemens:masterfromnoirbizarre:iterable
Jun 5, 2017
Merged

Conversation

@noirbizarre
Copy link
Contributor

This PR makesTable iterable andTinyDB iterable over default table so it's possible to write:

# Iter over default tabledb=TinyDB()forobjindb:do_something(obj)table=db.table('my_table')forobjintable:do_something(obj)

@msiemens
Copy link
Owner

I think that's a nice addition. I'm still thinking about where this should be described in the docs: basic usage or advanced usage.

@eugene-eeo What do you think about this change?

@noirbizarre
Copy link
ContributorAuthor

I just added a simple documentation proposal

@eugene-eeo
Copy link
Contributor

@msiemens I'm fine with it since it opotimises for the 80% use case. But it needs to be documented somewhere. Perhaps in Basic Usage would be appropriate.

@msiemensmsiemens merged commit8da0adb intomsiemens:masterJun 5, 2017
@msiemens
Copy link
Owner

since it opotimises for the 80% use case

Good point. I think it's quite intuitive foriter(db) to be an alias fordb.all(). Thanks for the Pull Request@noirbizarre!

@msiemens
Copy link
Owner

Also, I've now released TinyDB v3.3.0 which includes this feature :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@noirbizarre@msiemens@eugene-eeo

[8]ページ先頭

©2009-2025 Movatter.jp