Skip to content

Conversation

@geomars
Copy link
Contributor

@geomars geomars commented Oct 27, 2017

What does this PR do?

Close #32

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Short description of what this PR does:

  • Add USAGE.md
  • edit examples/example.py to be python 3 compatible

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Oct 27, 2017
@SendGridDX
Copy link

SendGridDX commented Oct 27, 2017

CLA assistant check
All committers have signed the CLA.

@@ -1,3 +1,6 @@
# Python 2/3 compatible codebase
from __future__ import absolute_import, division, print_function
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you add this?

Copy link
Contributor Author

@geomars geomars Oct 29, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The original last line on examples/example.py is print header.json_string() instead of print(header.json_string()) . I thought it might be intentional not an error or typho to keep the python2 version than upgrade to python3 by just change to print(). That's why I add this line. The from__future__ import absolute_import means that if py2 user import string, python will look for upper-level string module, rather than current_package.string, this will prevent error in module import. from __future__ import absolute_import, print_function enable the scripts backward compatibility with python2 while moving to python3 version.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NEAT!!

@mbernier mbernier added difficulty: medium fix is medium in difficulty hacktoberfest labels Oct 29, 2017
@mbernier
Copy link
Contributor

This is great work - I am just confused about that future statement, as I am not sure it's necessary.

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Oct 29, 2017
@mbernier mbernier merged commit 3766c77 into sendgrid:master Oct 30, 2017
@thinkingserious
Copy link
Contributor

Hello @geomars,

Thanks again for the PR!

We want to show our appreciation by sending you some swag. Could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

@eshanholtz eshanholtz changed the title Add USAGE.md docs: Add USAGE.md Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

difficulty: medium fix is medium in difficulty status: code review request requesting a community code review or review from Twilio

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a USAGE.md file

4 participants