Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
Unverified details These details have not been verified by PyPI Project links Homepage Source Meta License: OSI Approved, MIT License (MIT) Author: Ed Schofield Tags future , past , python3 , migration , futurize , backport , six , 2to3 , modernize , pasteurize , 3to2 Requires: Python >=2.6, !=3.0.*, !=3.1.*, !=3.2.* future is the missing compatibility layer between Python 2 and Python 3. It allow
Python 3 Module of the Week¶ PyMOTW-3 is a series of articles written by Doug Hellmann to demonstrate how to use the modules of the Python 3 standard library. It is based on the original PyMOTW series, which covered Python 2.7. See About Python Module of the Week for details including the version of Python and tools used.
あなたにとって重要なトピックや同僚の最新情報を入手しましょう最新の洞察とトレンドに関する最新情報を即座に受け取りましょう。 継続的な学習のために、無料のリソースに手軽にアクセスしましょうミニブック、トランスクリプト付き動画、およびトレーニング教材。 記事を保存して、いつでも読むことができます記事をブックマークして、準備ができたらいつでも読めます。
今年は娘ができたこともあり、 PyCon JP に発表だけじゃなく参加もしませんでした。 (娘と妻次第ですが、来年からはまた行きたいと思っています。) さて、 Twitter を眺めていると Python 3 に対するネガティブな反応がいきなり 流れ始めました。元になったのは id:fckey さんの PyCon JP 2014 1日目参加レポート #pyconjp という Blog 記事の、1日目 keynote の感想のようです。 PyCon JP 2014 の発表は YouTube で配信されていたので、そちらで keynote を 聞いた上で補足していきます。 ただし、英語のリスニングは苦手なので、 @kennethreitz さんの代弁や翻訳ではなく、 あくまでも個人的な意見です。 CH01 Opening~Keynote: Kenneth Reitz - YouTube 先に一
Cheat Sheet: Writing Python 2-3 compatible code¶ Copyright (c): 2013-2024 Python Charmers, Australia. Author: Ed Schofield. Licence: Creative Commons Attribution. A PDF version is here: https://python-future.org/compatible_idioms.pdf This notebook shows you idioms for writing future-proof code that is compatible with both versions of Python: 2 and 3. It accompanies Ed Schofield’s talk at PyCon AU
This document is for an old version of Python that is no longer supported. You should upgrade and read the Python documentation for the current stable release. 25.4. 2to3 - Automated Python 2 to 3 code translation¶ 2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers
Six: Python 2 and 3 Compatibility Library� Six provides simple utilities for wrapping over differences between Python 2 and Python 3. It is intended to support codebases that work on both Python 2 and 3 without modification. six consists of only one Python file, so it is painless to copy into a project. Six can be downloaded on PyPi. Its bug tracker and code hosting is on BitBucket. The name, “six
概要 With Python 3 being the future of Python while Python 2 is still in active use, it is good to have your project available for both major releases of Python. This guide is meant to help you figure out how best to support both Python 2 & 3 simultaneously. もしあなたが標準 Python ライブラリではなく拡張ライブラリでの移植手段を探しているならば Python 3 への拡張モジュール移植 を参照してください。 If you would like to read one core Python developer’s take on w
2011/12/25まで全25エントリつながりました。 参加していただいたみなさん。ありがとうございました! 今年もAdvent Calendarの季節がやってきました。 12/1から、順番に1日1エントリ書いて行ってクリスマスを迎えましょう! どんな内容を書けばいいの? Python3に関係していればなんでもオーケーです。 これまで二の足を踏んでいた方たちも、これを機会にPython3を触ってみてはどうでしょう。 ネタ例 Python3のここがすごいPython3から2にバックポートされたライブラリPython3で動かしてみたPython2からPython3へのポーティング 流れ まずは、このイベントに参加しましょう。俺はこのネタじゃないと書けない!という人はコメントで主張しておきましょう。指名された翌日にブログのエントリを書きましょう。都合が悪い場合は、代わりの人を探してください。次の
Python3には、2系で作られたコードを3用に変換する案をパッチを生成する2to3というコマンドラインツールが付属してます(本体はlib2to3という標準モジュール群)。たとえば、エンコード引数つきのunicode関数でも、そのままエンコード引数が存在しないstr関数に変えるなど、変換も完璧ではないけれど、たいていのコードは3で動くようになります。 しかし、変換してしまうとそのコードは2系では動かなくなります。ということで、2系でも3でも両方で動くようなコードを書くのはどうすればいいか、を考えてみました。 両方で動くようにするには、ない機能を使うわけには行かないので、どうしても共通部分のみでかかざろうえません。なのでお勧めはできないのですけど、一応両方で動かす前提で書くことを考えてみました。 print 関数風にカッコつき呼び出しにする(ただしprintのみの一行で) print(obj
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く