2008年12月3日(オランダ時間)、プログラミング言語Pythonの最新版となるPython 3.0(http://journal.mycom.co.jp/news/2008/12/04/041/index.html)が公開された。3.0は意図的に後方互換性が失われた初のバージョン。これまでのリリースよりも多くの変更が実施されており、すべてのPythonユーザに影響がある。しかし言語仕様が大幅に変更されたわけではない。これまで問題視されていた部分が変更されたといったもので、以前のバージョンよりも言語としての一貫性は向上している。以降で2系と3系の違いで特に注目されるポイントをかいつまんで紹介する。 Python Programming Language 最も目につく変更はprint命令がprint関数へ変更されたことだ。3.0ではprint命令は提供されていない。出力するにはprint関
Python Programming Language 13日(オランダ時間)、Python 3.0のバグ修正リリースとなるPython 3.0.1が公開された。Python 3.0はすでにバグ修正オンリーモードに入っており、これ以上新しい機能の追加はおこなわれない。Python 3.0.1は3.0を公開してから寄せられたバグ修正が実施されたバージョン。 Python 3.0は2008年12月3日(オランダ時間)に公開されたPythonの次世代バージョンにしてマイルストーンリリースとなるPythonの最新バージョン。プロダクションとしての利用レベルに達したと評価されており、言語表記の一貫性やこれまで問題視されていた部分が改善されるなど期待の高いバージョンになっている。 しかしPython 2系とは意図的に後方互換性が失われており、移行には注意が必要。2系と3系の違いや3系への移行方法はこち
id:yuroyoroがpython力を高めるとか言ってたのを聞いて、自分の場合どうだったかなあと。 思い入れがあるものを簡単に。まあ参考になれば。 pure python系 まずはpure python系 django 結構python初心者のころからdjangoのソースは読んでた。 多分、今ほど大きくなかったからだと思う。 学べることはPEP8、__import__の使い方、デコレータによるトランザクション管理などなど多岐にわたる。 但し、いきなりモデル周りに手を出すときついのでWEB側の入り口である方 django.core.handlers.base.py ぐらいがいいかなと。 middlewareってどうやって呼び出し、実行してるか、urlの解決方法などから入ると割りととっつきやすいかと。 フルスタック故カバーしてる範囲が多いのでずっと参考になる。 標準ライブラリのソース あんま
Posted on January 15th, 2009. Earlier tonight I added support for the Mint Bird Feeder plugin to my site's RSS feeds. Bird Feeder isn't designed to work with Django so I had to change a few things to get it up and running. I mostly followed the instructions on Hicks-Wright.net with a few tweaks. While I was trying to get things running smoothly I had to redeploy the site a bunch of times so I coul
(It's been a very long time since this RSS feed has had an update. Um. Suprise!) At work, as a Lunch Time Project™, myself, Ed and David have designed an ultra-ultra-lightweight protocol for exposing a few methods returning simple structures, with the aim of creating rapid AJAX prototypes for internal and "fun" projects. (In the spirit of internal and fun project, Pembo developed a system for trac
Versión en español Pycha (PYthon CHArts) Pycha is a very simple Python package for drawing charts using the great Cairo library. Its goals are: Lightweight Simple to use Nice looking with default values Customization It won't try to draw any possible chart on earth but draw the most common ones nicely. There are some other options you may want to look at like pyCairoChart Pycha is based on Plotr w
言語としての一貫性を重視したPython 3の進化:よりPythonicなPythonを目指して(後編)(1/2 ページ) Python 3.0では、Python 2で書かれたスクリプトが動かなくなるような実装が行われた。なぜ、後方互換性を崩してまで大きな仕様変更を行ったのか。それは、PythonがよりPythonらしくあるためだ。 前編「Python 3が後方互換性を捨てても求めたもの」では、後方互換性を犠牲にしてでも、よりPythonらしくあるために仕様を変更したことに触れながら、いくつかの機能変更を見てきました。 それは、「誰もが正しいと考える、たった1つの方法をできる限り採用する(There should be one-and preferably only one-obvious way to do it)」というPythonの設計思想を、より高次元で実現するために必要だったから
OpenSSH is the ubiquitous method of remote access for secure remote-machine login and file transfers. Many people — systems administrators, test automation engineers, web developers and others have to use and interact with it daily. Scripting SSH access and file transfers with Python can be frustrating — but the Paramiko module solves that in a powerful way. This is a reprint of an article I wrote
I'm excited to announce the release of Fudge, a Python module for replacing real objects with fakes (mocks, stubs, etc) while testing. Fudge started when a co-worker introduced me to Mocha, a mocking framework for Ruby and a simpler version of jMock (Java). Up to that point I had been building mocks "by hand" in Python with a post mortem approach; I'd set up some fakes then inspect their call stac
ちょっとPlugin的なものを実装しようとしてたら行き着いた。 http://lucumr.pocoo.org/2006/7/3/python-plugin-system importする仕組みはよくあるのでわかるんだけど。 読み込んだモジュールからPluginクラスを抽出するスマートな方法が書いてあったので紹介しておく。 class Plugin(object): pass class MyPlugin1(Plugin): pass class MyPlugin2(Plugin): pass Plugin.__subclasses__() __subclasses__()で一発でとれる。 baseのtuple(スーパークラスのリスト)はよく使うんだけどsubclassも取れるのは忘れてた。 で自分でも書いてみた。 plugin.py import sys import os import
GitPython is a python library used to interact with Git repositories. GitPython provides object model access to your git repository. Once you have created a repository object, you can traverse it to find parent commit(s), trees, blobs, etc. GitPython is a port of the grit library in Ruby created by Tom Preston-Werner and Chris Wanstrath.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く