Skip to content

Commit

Permalink
Remove some informal language
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasw committed Nov 26, 2012
1 parent 3eed82c commit e27199c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
16 changes: 9 additions & 7 deletions README.md
Expand Up @@ -14,7 +14,7 @@ dictionaries that enables dot lookups and assignment for key values.

## Installation

Install Querylist like you'd install any other Python package:
Querylist can be installed like any other python package:

> pip install querylist

Expand All @@ -24,8 +24,8 @@ Querylist is tested against Python >2.5, <3.0.

### BetterDicts

BetterDicts wrap normal dicts. They have all of the same functionality you'd
expect from a normal dict:
BetterDicts wrap normal dicts. They have all of the same functionality one
would expect from a normal dict:

>>> from querylist import BetterDict
>>> src = {'foo': 'bar', 'items': True}
Expand Down Expand Up @@ -96,15 +96,17 @@ QueryLists work just like lists:
>>> ql == site_list
True

They also let you, exclude objects that don't match criteria via field lookups
or limit the QueryList to only the objects that do match a provided criteria:
They also let developers, exclude objects that don't match criteria via field
lookups or limit the QueryList to only the objects that do match a provided
criteria:

>>> ql.exclude(published=True)
[{'url': 'http://site3.tld/', 'meta': {'keywords': ['Mustard', 'kittens'], 'description': 'My cool site'}, 'id': 3, 'name': 'Site 3', 'published': False}]
>>> ql.limit(published=True).exclude(meta__keywords__contains='Catsup')
[{'url': 'http://site1.tld/', 'meta': {'keywords': ['Mustard', 'kittens'], 'description': 'My cool site'}, 'id': 1, 'name': 'Site 1', 'published': True}]

And finally, they let you retrieve specific objects with the get method:
And finally, they let developers retrieve specific objects with the get
method:

>>> ql.get(id=2)
{'url': 'http://site1.tld/', 'meta': {'keywords': ['Mustard', 'kittens'], 'description': 'My cool site'}, 'id': 1, 'name': 'Site 1', 'published': True}
Expand All @@ -130,7 +132,7 @@ the following, which publishes all unpublished sites:
3. Use [testtube](https://github.com/thomasw/testtube/)'s `stir` command
(installed via #2) to monitor the project directory for changes and
automatically run the test suite.
4. Make your changes and submit a pull request.
4. Make changes and submit a pull request.

At the moment, Querylist has great test coverage. Please do your part to help
keep it that way by writing tests whenever you add or change code.
Expand Down
5 changes: 0 additions & 5 deletions docs/source/index.rst
@@ -1,8 +1,3 @@
.. Querylist documentation master file, created by
sphinx-quickstart on Sat Nov 24 21:52:07 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Querylist
=========

Expand Down
6 changes: 3 additions & 3 deletions docs/source/installation.rst
@@ -1,12 +1,12 @@
Installation
============

You can install querylist like you'd install any other python package::
Querylist can be installed like any other python package::

$ pip install querylist

Once installed, you can import both QueryList and BetterDict directly from
the querylist module and use them to your heart's content.
Once installed, both QueryList and BetterDict can be imported directly from
the querylist module.

>>> from querylist import BetterDict, QueryList

Expand Down
2 changes: 1 addition & 1 deletion docs/source/querylist.rst
Expand Up @@ -106,7 +106,7 @@ Properties of properties
^^^^^^^^^^^^^^^^^^^^^^^^

Field lookups can extend to properties of properties (and so on). Simply
replace the dot operator that you'd normally use with a double underscore.
replace the dot operator that one would normally use with a double underscore.
``meta__description="Cats"``, for example, would match against all objects in
the QueryList where object.meta.description=="Cats."

Expand Down
2 changes: 1 addition & 1 deletion querylist/querylist.py
Expand Up @@ -13,7 +13,7 @@ class QueryList(list):
Keywrod arguments:
* data -- an iterable reprsenting the data that you would like to query.
* data -- an iterable reprsenting the data that to be to queried.
* wrapper -- a callable that can convert data's elements to objects that
are compatbile with QueryList
* wrap -- Boolean toggle to indicate whether or not to call wrapper on
Expand Down

0 comments on commit e27199c

Please sign in to comment.