Skip to content

Conversation

@miss-islington
Copy link
Contributor

  1. Convert weird field name "typ" to the more standard "type".
  2. For the NUMBER type, convert the value to an int() or float().
  3. Simplify group(kind) to the shorter and faster group() call.
  4. Simplify logic go a single if-elif chain to make this easier to extend.
  5. Reorder the tests to match the order the tokens are specified.
    This isn't necessary for correctness but does make the example
    easier to follow.
  6. Move the "column" calculation before the if-elif chain so that
    users have the option of using this value in error messages.
    (cherry picked from commit b83942c)

Co-authored-by: Raymond Hettinger rhettinger@users.noreply.github.com

1) Convert weird field name "typ" to the more standard "type".
2) For the NUMBER type, convert the value to an int() or float().
3) Simplify ``group(kind)`` to the shorter and faster ``group()`` call.
4) Simplify logic go a single if-elif chain to make this easier to extend.
5) Reorder the tests to match the order the tokens are specified.
   This isn't necessary for correctness but does make the example
   easier to follow.
6) Move the "column" calculation before the if-elif chain so that
   users have the option of using this value in error messages.
(cherry picked from commit b83942c)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
@miss-islington
Copy link
Contributor Author

@rhettinger: Status check is done, and it's a success ✅ .

@rhettinger rhettinger merged commit 33fd60d into python:3.7 Nov 9, 2018
@bedevere-bot
Copy link

@rhettinger: Please replace # with GH- in the commit message next time. Thanks!

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

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants