Skip to content

Commit

Permalink
Grammer
Browse files Browse the repository at this point in the history
  • Loading branch information
jamespeterschinner committed Oct 23, 2017
1 parent 3225319 commit 7f4bafc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions async_v20/definitions/metaclass.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ def __new__(mcs, *args, **kwargs):

# async_v20 allows camelCase and snake_case to be used when instantiating objects.
# arguments passed in camelCase are converted to snake_case prior to attribute assignment.
# Signatures arguments are also snake_case.
# when serializing objects attributes must be converted to camelCase,
# Signature arguments are also snake_case.
# when serializing objects. Attributes must be converted to camelCase,
# as per OANDA's specification.
# To achieve this these two dictionary's are created:
# instance_attributes :- camelCase & snake_case keys -> snake_case values
# json_attributes :- snake_case
# json_attributes :- snake_case keys -> camelCase values
mcs.instance_attributes.update(create_instance_attributes(class_obj))
mcs.json_attributes.update(create_json_attributes(class_obj))

Expand Down
4 changes: 2 additions & 2 deletions doc/source/beyond_getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ each *OandaClient*. **method** defines.

There is a two step process by which the response is constructed:
- The http :term:`status` is used to look up the expected response
- Each JSON object is constructed into the appropriate object
- Each JSON object is constructed into the appropriate python object

How Objects are Serialized
__________________________
Expand All @@ -112,7 +112,7 @@ The issue here is that OANDA defines objects with :term:`camelCase` :term:`attri
Python programs typically reserve camelCase for :term:`class` definitions.

This means, in order to both satisfy python standards and OANDA,
objects as defined in :ref:`class-definitions` need to accept `camelCase` and :term:`snake_case`
objects (as defined in :ref:`class-definitions`) need to accept `camelCase` and :term:`snake_case`
arguments when being constructed

`objects` store there attributes as `snake_case` (as python programmers would expect),
Expand Down

0 comments on commit 7f4bafc

Please sign in to comment.