Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: about commercial use of code sample. #34

Open
igreenfield opened this issue Jan 17, 2023 · 3 comments
Open

Question: about commercial use of code sample. #34

igreenfield opened this issue Jan 17, 2023 · 3 comments

Comments

@igreenfield
Copy link

Hi,
Can I copy one sample code from the book and use it in a commercial product?

@regebro
Copy link
Owner

regebro commented Jan 18, 2023

Probably, what bit of code?

@igreenfield
Copy link
Author

this:
http://python3porting.com/problems.html#nicer-solutions:

import sys
if sys.version_info < (3,):
    def b(x):
        return x
else:
    import codecs
    def b(x):
        return codecs.latin_1_encode(x)[0]

@regebro
Copy link
Owner

regebro commented Jan 23, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants