Py

Python 3 with backwards compatibility features

Hacker News

Python 3 with backwards compatibility features

Porting Python code from version 2.x to 3.x is not a simple task. To help, I built a version of Python 3.6 that includes backwards compatibility features. Most important is the mixing of bytes and str objects and comparisons. For example, in vanilla Python 3: >>> b'foo' + 'bar' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: can't concat bytes to str >>> None < 'hi' Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unorderable types: NoneType() < str() In my Python 3: >>> b'foo' + 'bar' sys:1: DeprecationWarning: encoding bytes to str 'foobar' >>> None < 'hi' __main__:1: DeprecationWarning: default compare is depreciated True Certain changes are easy to fix with code converters like 2to3. For example, changing print statements into functions is trivial. I don't bother trying to handle those. There is still a lot of things that could be added. However, when porting a large code base to Python 3, I found it useful. I hope other people might use it and submit improvements. If someone need pre-built binaries (e.g. Windows), I would be willing to do it. https://github.com/nascheme/ppython

Share card

Actual performance

7points
2comments
Made the leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
61%61% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Hacker NewsStrong engagement from HN community · Strong signals: io · Missing: https docs, excited, just released
51%51% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
AppSumoMay struggle as an AppSumo deal · Missing: plus, platform, intuitive
37%37% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Product HuntUnlikely to reach the leaderboard · Strong signals: coding, code · Missing: mac, agents, macos
36%36% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
30%30% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
14%14% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Py
Python-to-Python compiler for some 3.6 features in older versions62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Python-to-Python compiler for some 3.6 features in older versions

Hacker News87
Py
PyTricks, unpopular built-in Python features59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PyTricks, unpopular built-in Python features

Hacker News5
Cu
CustomStringParser ( Python)54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

CustomStringParser ( Python)

Hacker News1
Lu
Lusernews is an implementation of lamernews in python48%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Lusernews is an implementation of lamernews in python

Hacker News1
Do
Do/While in Python55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Do/While in Python

Hacker News4
Ga
Gatos, conCATenative functions for python54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Gatos, conCATenative functions for python

Hacker News1
A
A wrapper around datetime, pytz and tzlocal for Python 3.2+38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

A wrapper around datetime, pytz and tzlocal for Python 3.2+

Hacker News1
Pa
Parallelizing word2vec in Python55%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Parallelizing word2vec in Python

Hacker News3
pi
piprot – How rotten are your [python] requirements?37%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

piprot – How rotten are your [python] requirements?

Hacker News1
Fa
Fancy iterators for Python 2.7 - 3.x54%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Fancy iterators for Python 2.7 - 3.x

Hacker News5