Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
021b8811
Commit
021b8811
authored
May 17, 2011
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Plain Diff
merge heads
parents
43716e25
0658bfff
Changes
35
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
35 changed files
with
308 additions
and
1033 deletions
+308
-1033
.hgeol
.hgeol
+2
-1
Doc/library/struct.rst
Doc/library/struct.rst
+1
-1
Doc/tutorial/controlflow.rst
Doc/tutorial/controlflow.rst
+3
-4
Lib/idlelib/ScriptBinding.py
Lib/idlelib/ScriptBinding.py
+17
-0
Lib/locale.py
Lib/locale.py
+1
-1
Lib/tarfile.py
Lib/tarfile.py
+3
-1
Lib/test/cjkencodings/big5-utf8.txt
Lib/test/cjkencodings/big5-utf8.txt
+9
-0
Lib/test/cjkencodings/big5.txt
Lib/test/cjkencodings/big5.txt
+9
-0
Lib/test/cjkencodings/big5hkscs-utf8.txt
Lib/test/cjkencodings/big5hkscs-utf8.txt
+2
-0
Lib/test/cjkencodings/big5hkscs.txt
Lib/test/cjkencodings/big5hkscs.txt
+2
-0
Lib/test/cjkencodings/cp949-utf8.txt
Lib/test/cjkencodings/cp949-utf8.txt
+9
-0
Lib/test/cjkencodings/cp949.txt
Lib/test/cjkencodings/cp949.txt
+9
-0
Lib/test/cjkencodings/euc_jisx0213-utf8.txt
Lib/test/cjkencodings/euc_jisx0213-utf8.txt
+8
-0
Lib/test/cjkencodings/euc_jisx0213.txt
Lib/test/cjkencodings/euc_jisx0213.txt
+8
-0
Lib/test/cjkencodings/euc_jp-utf8.txt
Lib/test/cjkencodings/euc_jp-utf8.txt
+7
-0
Lib/test/cjkencodings/euc_jp.txt
Lib/test/cjkencodings/euc_jp.txt
+7
-0
Lib/test/cjkencodings/euc_kr-utf8.txt
Lib/test/cjkencodings/euc_kr-utf8.txt
+7
-0
Lib/test/cjkencodings/euc_kr.txt
Lib/test/cjkencodings/euc_kr.txt
+7
-0
Lib/test/cjkencodings/gb18030-utf8.txt
Lib/test/cjkencodings/gb18030-utf8.txt
+15
-0
Lib/test/cjkencodings/gb18030.txt
Lib/test/cjkencodings/gb18030.txt
+15
-0
Lib/test/cjkencodings/gb2312-utf8.txt
Lib/test/cjkencodings/gb2312-utf8.txt
+6
-0
Lib/test/cjkencodings/gb2312.txt
Lib/test/cjkencodings/gb2312.txt
+6
-0
Lib/test/cjkencodings/gbk-utf8.txt
Lib/test/cjkencodings/gbk-utf8.txt
+14
-0
Lib/test/cjkencodings/gbk.txt
Lib/test/cjkencodings/gbk.txt
+14
-0
Lib/test/cjkencodings/johab-utf8.txt
Lib/test/cjkencodings/johab-utf8.txt
+9
-0
Lib/test/cjkencodings/johab.txt
Lib/test/cjkencodings/johab.txt
+9
-0
Lib/test/cjkencodings/shift_jis-utf8.txt
Lib/test/cjkencodings/shift_jis-utf8.txt
+7
-0
Lib/test/cjkencodings/shift_jis.txt
Lib/test/cjkencodings/shift_jis.txt
+7
-0
Lib/test/cjkencodings/shift_jisx0213-utf8.txt
Lib/test/cjkencodings/shift_jisx0213-utf8.txt
+8
-0
Lib/test/cjkencodings/shift_jisx0213.txt
Lib/test/cjkencodings/shift_jisx0213.txt
+8
-0
Lib/test/cjkencodings_test.py
Lib/test/cjkencodings_test.py
+0
-1019
Lib/test/test_linecache.py
Lib/test/test_linecache.py
+1
-1
Lib/test/test_multibytecodec_support.py
Lib/test/test_multibytecodec_support.py
+12
-5
Lib/test/test_tarfile.py
Lib/test/test_tarfile.py
+60
-0
Misc/NEWS
Misc/NEWS
+6
-0
No files found.
.hgeol
View file @
021b8811
...
...
@@ -27,8 +27,9 @@
**.zip = BIN
Lib/email/test/data/msg_26.txt = BIN
Lib/test/
sndhdrdata/sndhdr.
* = BIN
Lib/test/
cjkencodings/
* = BIN
Lib/test/decimaltestdata/*.decTest = BIN
Lib/test/sndhdrdata/sndhdr.* = BIN
# All other files (which presumably are human-editable) are "native".
# This must be the last rule!
...
...
Doc/library/struct.rst
View file @
021b8811
...
...
@@ -314,7 +314,7 @@ the result in a named tuple::
>>> from collections import namedtuple
>>> Student = namedtuple('Student', 'name serialnum school gradelevel')
>>> Student._make(unpack('<10sHHb',
s
))
>>> Student._make(unpack('<10sHHb',
record
))
Student(name='raymond ', serialnum=4658, school=264, gradelevel=8)
The ordering of format characters may have an impact on size since the padding
...
...
Doc/tutorial/controlflow.rst
View file @
021b8811
...
...
@@ -455,10 +455,9 @@ and of course it would print::
shopkeeper : Michael Palin
sketch : Cheese Shop Sketch
Note that the :meth:`sort` method of the list of keyword argument names is
called before printing the contents of the ``keywords`` dictionary; if this is
not done, the order in which the arguments are printed is undefined.
Note that the list of keyword argument names is created by sorting the result
of the keywords dictionary's ``keys()`` method before printing its contents;
if this is not done, the order in which the arguments are printed is undefined.
.. _tut-arbitraryargs:
...
...
Lib/idlelib/ScriptBinding.py
View file @
021b8811
...
...
@@ -26,6 +26,7 @@ import tkMessageBox
from
idlelib
import
PyShell
from
idlelib.configHandler
import
idleConf
from
idlelib
import
macosxSupport
IDENTCHARS
=
string
.
ascii_letters
+
string
.
digits
+
"_"
...
...
@@ -53,6 +54,9 @@ class ScriptBinding:
self
.
flist
=
self
.
editwin
.
flist
self
.
root
=
self
.
editwin
.
root
if
macosxSupport
.
runningAsOSXApp
():
self
.
editwin
.
text_frame
.
bind
(
'<<run-module-event-2>>'
,
self
.
_run_module_event
)
def
check_module_event
(
self
,
event
):
filename
=
self
.
getfilename
()
if
not
filename
:
...
...
@@ -166,6 +170,19 @@ class ScriptBinding:
interp
.
runcode
(
code
)
return
'break'
if
macosxSupport
.
runningAsOSXApp
():
# Tk-Cocoa in MacOSX is broken until at least
# Tk 8.5.9, and without this rather
# crude workaround IDLE would hang when a user
# tries to run a module using the keyboard shortcut
# (the menu item works fine).
_run_module_event
=
run_module_event
def
run_module_event
(
self
,
event
):
self
.
editwin
.
text_frame
.
after
(
200
,
lambda
:
self
.
editwin
.
text_frame
.
event_generate
(
'<<run-module-event-2>>'
))
return
'break'
def
getfilename
(
self
):
"""Get source filename. If not saved, offer to save (or create) file
...
...
Lib/locale.py
View file @
021b8811
...
...
@@ -621,7 +621,7 @@ locale_encoding_alias = {
'tactis'
:
'TACTIS'
,
'euc_jp'
:
'eucJP'
,
'euc_kr'
:
'eucKR'
,
'utf_8'
:
'UTF8'
,
'utf_8'
:
'UTF
-
8'
,
'koi8_r'
:
'KOI8-R'
,
'koi8_u'
:
'KOI8-U'
,
# XXX This list is still incomplete. If you know more
...
...
Lib/tarfile.py
View file @
021b8811
...
...
@@ -2239,12 +2239,14 @@ class TarFile(object):
if hasattr(os, "
symlink
") and hasattr(os, "
link
"):
# For systems that support symbolic and hard links.
if tarinfo.issym():
if os.path.exists(targetpath):
if os.path.
l
exists(targetpath):
os.unlink(targetpath)
os.symlink(tarinfo.linkname, targetpath)
else:
# See extract().
if os.path.exists(tarinfo._link_target):
if os.path.lexists(targetpath):
os.unlink(targetpath)
os.link(tarinfo._link_target, targetpath)
else:
self._extract_member(self._find_link_target(tarinfo), targetpath)
...
...
Lib/test/cjkencodings/big5-utf8.txt
0 → 100644
View file @
021b8811
如何在 Python 中使用既有的 C library?
在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:
Lib/test/cjkencodings/big5.txt
0 → 100644
View file @
021b8811
如何在 Python 中使用既有的 C library?
在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:
Lib/test/cjkencodings/big5hkscs-utf8.txt
0 → 100644
View file @
021b8811
𠄌Ě鵮罓洆
ÊÊ̄ê êê̄
Lib/test/cjkencodings/big5hkscs.txt
0 → 100644
View file @
021b8811
E\sڍ
fb
Lib/test/cjkencodings/cp949-utf8.txt
0 → 100644
View file @
021b8811
똠방각하 펲시콜라
㉯㉯납!! 因九月패믤릔궈 ⓡⓖ훀¿¿¿ 긍뒙 ⓔ뎨 ㉯. .
亞영ⓔ능횹 . . . . 서울뤄 뎐학乙 家훀 ! ! !ㅠ.ㅠ
흐흐흐 ㄱㄱㄱ☆ㅠ_ㅠ 어릨 탸콰긐 뎌응 칑九들乙 ㉯드긐
설릌 家훀 . . . . 굴애쉌 ⓔ궈 ⓡ릘㉱긐 因仁川女中까즼
와쒀훀 ! ! 亞영ⓔ 家능궈 ☆上관 없능궈능 亞능뒈훀 글애듴
ⓡ려듀九 싀풔숴훀 어릨 因仁川女中싁⑨들앜!! ㉯㉯납♡ ⌒⌒*
Lib/test/cjkencodings/cp949.txt
0 → 100644
View file @
021b8811
寞陝 藥搋
阱阱陶!! 孻朐篘掬 佺來麗000 晤 供絨 阱. .
銢艙供棟 . . . . 憮選瘀 粟錟 坅麗 ! ! !壬.壬
丑丑丑≧壬_壬 橫 攣攜 筑擬 疲朐菟錟 阱萄
撲 坅麗 . . . . 掉擁 供掬 佺阬 孻嬬藿澇齌梱
諦冀麗 ! ! 銢艙供 坅棟掬 ≧葞婦 橈棟掬棟 銢棟華麗 旋擁
佺溥菽朐 膜麗 橫 孻嬬藿澇齌剁菟!! 阱阱陶Ⅴ ÷÷*
Lib/test/cjkencodings/euc_jisx0213-utf8.txt
0 → 100644
View file @
021b8811
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
ノか゚ ト゚ トキ喝塀 𡚴𪎌 麀齁𩛰
Lib/test/cjkencodings/euc_jisx0213.txt
0 → 100644
View file @
021b8811
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
ノ トキ
Lib/test/cjkencodings/euc_jp-utf8.txt
0 → 100644
View file @
021b8811
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
Lib/test/cjkencodings/euc_jp.txt
0 → 100644
View file @
021b8811
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
Lib/test/cjkencodings/euc_kr-utf8.txt
0 → 100644
View file @
021b8811
◎ 파이썬(Python)은 배우기 쉽고, 강력한 프로그래밍 언어입니다. 파이썬은
효율적인 고수준 데이터 구조와 간단하지만 효율적인 객체지향프로그래밍을
지원합니다. 파이썬의 우아(優雅)한 문법과 동적 타이핑, 그리고 인터프리팅
환경은 파이썬을 스크립팅과 여러 분야에서와 대부분의 플랫폼에서의 빠른
애플리케이션 개발을 할 수 있는 이상적인 언어로 만들어줍니다.
☆첫가끝: 날아라 쓔쓔쓩~ 닁큼! 뜽금없이 전홥니다. 뷁. 그런거 읎다.
Lib/test/cjkencodings/euc_kr.txt
0 → 100644
View file @
021b8811
◎ 파이썬(Python)은 배우기 쉽고, 강력한 프로그래밍 언어입니다. 파이썬은
효율적인 고수준 데이터 구조와 간단하지만 효율적인 객체지향프로그래밍을
지원합니다. 파이썬의 우아(優雅)한 문법과 동적 타이핑, 그리고 인터프리팅
환경은 파이썬을 스크립팅과 여러 분야에서와 대부분의 플랫폼에서의 빠른
애플리케이션 개발을 할 수 있는 이상적인 언어로 만들어줍니다.
☆첫가끝: 날아라 ㅤㅆㅠㅤㅤㅆㅠㅤ쓩~ ㅤㄴㅢㅇ큼! ㅤㄸㅡㅇ금없이 전ㅤㅎㅘㅂ니다. ㅤㅂㅞㄺ. 그런거 ㅤㅇㅡㅄ다.
Lib/test/cjkencodings/gb18030-utf8.txt
0 → 100644
View file @
021b8811
Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言,
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
如何在 Python 中使用既有的 C library?
在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:
파이썬은 강력한 기능을 지닌 범용 컴퓨터 프로그래밍 언어다.
Lib/test/cjkencodings/gb18030.txt
0 → 100644
View file @
021b8811
Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言,
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
如何在 Python 中使用既有的 C library?
在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:
파이썬은 강력한 기능을 지닌 범용 컴퓨터 프로그래밍 언어다.
Lib/test/cjkencodings/gb2312-utf8.txt
0 → 100644
View file @
021b8811
Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言,
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
Lib/test/cjkencodings/gb2312.txt
0 → 100644
View file @
021b8811
Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言,
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
Lib/test/cjkencodings/gbk-utf8.txt
0 → 100644
View file @
021b8811
Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言,
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
如何在 Python 中使用既有的 C library?
在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:
Lib/test/cjkencodings/gbk.txt
0 → 100644
View file @
021b8811
Python(派森)语言是一种功能强大而完善的通用型计算机程序设计语言,
已经具有十多年的发展历史,成熟且稳定。这种语言具有非常简捷而清晰
的语法特点,适合完成各种高层任务,几乎可以在所有的操作系统中
运行。这种语言简单而强大,适合各种人士学习使用。目前,基于这
种语言的相关技术正在飞速的发展,用户数量急剧扩大,相关的资源非常多。
如何在 Python 中使用既有的 C library?
在資訊科技快速發展的今天, 開發及測試軟體的速度是不容忽視的
課題. 為加快開發及測試的速度, 我們便常希望能利用一些已開發好的
library, 並有一個 fast prototyping 的 programming language 可
供使用. 目前有許許多多的 library 是以 C 寫成, 而 Python 是一個
fast prototyping 的 programming language. 故我們希望能將既有的
C library 拿到 Python 的環境中測試及整合. 其中最主要也是我們所
要討論的問題就是:
Lib/test/cjkencodings/johab-utf8.txt
0 → 100644
View file @
021b8811
똠방각하 펲시콜라
㉯㉯납!! 因九月패믤릔궈 ⓡⓖ훀¿¿¿ 긍뒙 ⓔ뎨 ㉯. .
亞영ⓔ능횹 . . . . 서울뤄 뎐학乙 家훀 ! ! !ㅠ.ㅠ
흐흐흐 ㄱㄱㄱ☆ㅠ_ㅠ 어릨 탸콰긐 뎌응 칑九들乙 ㉯드긐
설릌 家훀 . . . . 굴애쉌 ⓔ궈 ⓡ릘㉱긐 因仁川女中까즼
와쒀훀 ! ! 亞영ⓔ 家능궈 ☆上관 없능궈능 亞능뒈훀 글애듴
ⓡ려듀九 싀풔숴훀 어릨 因仁川女中싁⑨들앜!! ㉯㉯납♡ ⌒⌒*
Lib/test/cjkencodings/johab.txt
0 → 100644
View file @
021b8811
wba \ũa
s!! gÚ zٯٯٯ w ѕ . .
<wѓws . . . . ᶉ eb ;z ! ! !A.A
aaa AAAiA_A ៚ ȡz aw ×✗i az
z ;z . . . . ъ ޟz gbIa
z ! ! <w ;w i꾉 ww <wz iz
ޝaA Ρz ៚ gbI鯂iz!! sٽ bb*
Lib/test/cjkencodings/shift_jis-utf8.txt
0 → 100644
View file @
021b8811
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
Lib/test/cjkencodings/shift_jis.txt
0 → 100644
View file @
021b8811
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
Lib/test/cjkencodings/shift_jisx0213-utf8.txt
0 → 100644
View file @
021b8811
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
ノか゚ ト゚ トキ喝塀 𡚴𪎌 麀齁𩛰
Lib/test/cjkencodings/shift_jisx0213.txt
0 → 100644
View file @
021b8811
Python の開発は、1990 年ごろから開始されています。
開発者の Guido van Rossum は教育用のプログラミング言語「ABC」の開発に参加していましたが、ABC は実用上の目的にはあまり適していませんでした。
このため、Guido はより実用的なプログラミング言語の開発を開始し、英国 BBS 放送のコメディ番組「モンティ パイソン」のファンである Guido はこの言語を「Python」と名づけました。
このような背景から生まれた Python の言語設計は、「シンプル」で「習得が容易」という目標に重点が置かれています。
多くのスクリプト系言語ではユーザの目先の利便性を優先して色々な機能を言語要素として取り入れる場合が多いのですが、Python ではそういった小細工が追加されることはあまりありません。
言語自体の機能は最小限に押さえ、必要な機能は拡張モジュールとして追加する、というのが Python のポリシーです。
ノ トキ
Lib/test/cjkencodings_test.py
deleted
100644 → 0
View file @
43716e25
This diff is collapsed.
Click to expand it.
Lib/test/test_linecache.py
View file @
021b8811
...
...
@@ -9,7 +9,7 @@ from test import test_support as support
FILENAME
=
linecache
.
__file__
INVALID_NAME
=
'!@$)(!@#_1'
EMPTY
=
''
TESTS
=
'
cjkencodings_test
inspect_fodder inspect_fodder2 mapping_tests'
TESTS
=
'inspect_fodder inspect_fodder2 mapping_tests'
TESTS
=
TESTS
.
split
()
TEST_PATH
=
os
.
path
.
dirname
(
support
.
__file__
)
MODULES
=
"linecache abc"
.
split
()
...
...
Lib/test/test_multibytecodec_support.py
View file @
021b8811
...
...
@@ -4,8 +4,11 @@
# Common Unittest Routines for CJK codecs
#
import
sys
,
codecs
import
unittest
,
re
import
codecs
import
os
import
re
import
sys
import
unittest
from
httplib
import
HTTPException
from
test
import
test_support
from
StringIO
import
StringIO
...
...
@@ -326,6 +329,10 @@ class TestBase_Mapping(unittest.TestCase):
self
.
fail
(
'Decoding failed while testing %s -> %s: %s'
%
(
repr
(
csetch
),
repr
(
unich
),
exc
.
reason
))
def
load_teststring
(
encoding
):
from
test
import
cjkencodings_test
return
cjkencodings_test
.
teststring
[
encoding
]
def
load_teststring
(
name
):
dir
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'cjkencodings'
)
with
open
(
os
.
path
.
join
(
dir
,
name
+
'.txt'
),
'rb'
)
as
f
:
encoded
=
f
.
read
()
with
open
(
os
.
path
.
join
(
dir
,
name
+
'-utf8.txt'
),
'rb'
)
as
f
:
utf8
=
f
.
read
()
return
encoded
,
utf8
Lib/test/test_tarfile.py
View file @
021b8811
...
...
@@ -872,6 +872,66 @@ class WriteTest(WriteTestBase):
os
.
unlink
(
temparchive
)
shutil
.
rmtree
(
tempdir
)
@
unittest
.
skipUnless
(
hasattr
(
os
,
'symlink'
),
"needs os.symlink"
)
def
test_extractall_broken_symlinks
(
self
):
# Test if extractall works properly when tarfile contains broken
# symlinks
tempdir
=
os
.
path
.
join
(
TEMPDIR
,
"testsymlinks"
)
temparchive
=
os
.
path
.
join
(
TEMPDIR
,
"testsymlinks.tar"
)
os
.
mkdir
(
tempdir
)
try
:
source_file
=
os
.
path
.
join
(
tempdir
,
'source'
)
target_file
=
os
.
path
.
join
(
tempdir
,
'symlink'
)
with
open
(
source_file
,
'w'
)
as
f
:
f
.
write
(
'something
\
n
'
)
os
.
symlink
(
source_file
,
target_file
)
tar
=
tarfile
.
open
(
temparchive
,
'w'
)
tar
.
add
(
target_file
,
arcname
=
os
.
path
.
basename
(
target_file
))
tar
.
close
()
# remove the real file
os
.
unlink
(
source_file
)
# Let's extract it to the location which contains the symlink
tar
=
tarfile
.
open
(
temparchive
,
'r'
)
# this should not raise OSError: [Errno 17] File exists
try
:
tar
.
extractall
(
path
=
tempdir
)
except
OSError
:
self
.
fail
(
"extractall failed with broken symlinked files"
)
finally
:
tar
.
close
()
finally
:
os
.
unlink
(
temparchive
)
shutil
.
rmtree
(
tempdir
)
@
unittest
.
skipUnless
(
hasattr
(
os
,
'link'
),
"needs os.link"
)
def
test_extractall_hardlinks
(
self
):
# Test if extractall works properly when tarfile contains symlinks
tempdir
=
os
.
path
.
join
(
TEMPDIR
,
"testsymlinks"
)
temparchive
=
os
.
path
.
join
(
TEMPDIR
,
"testsymlinks.tar"
)
os
.
mkdir
(
tempdir
)
try
:
source_file
=
os
.
path
.
join
(
tempdir
,
'source'
)
target_file
=
os
.
path
.
join
(
tempdir
,
'symlink'
)
with
open
(
source_file
,
'w'
)
as
f
:
f
.
write
(
'something
\
n
'
)
os
.
link
(
source_file
,
target_file
)
tar
=
tarfile
.
open
(
temparchive
,
'w'
)
tar
.
add
(
source_file
,
arcname
=
os
.
path
.
basename
(
source_file
))
tar
.
add
(
target_file
,
arcname
=
os
.
path
.
basename
(
target_file
))
tar
.
close
()
# Let's extract it to the location which contains the symlink
tar
=
tarfile
.
open
(
temparchive
,
'r'
)
# this should not raise OSError: [Errno 17] File exists
try
:
tar
.
extractall
(
path
=
tempdir
)
except
OSError
:
self
.
fail
(
"extractall failed with linked files"
)
finally
:
tar
.
close
()
finally
:
os
.
unlink
(
temparchive
)
shutil
.
rmtree
(
tempdir
)
class
StreamWriteTest
(
WriteTestBase
):
mode
=
"w|"
...
...
Misc/NEWS
View file @
021b8811
...
...
@@ -80,6 +80,12 @@ Core and Builtins
Library
-------
- Issue #11088: don'
t
crash
when
using
F5
to
run
a
script
in
IDLE
on
MacOSX
with
Tk
8.5
.
-
Issue
#
10154
,
#
10090
:
change
the
normalization
of
UTF
-
8
to
"UTF-8"
instead
of
"UTF8"
in
the
locale
module
as
the
latter
is
not
supported
MacOSX
and
OpenBSD
.
-
Issue
#
9516
:
avoid
errors
in
sysconfig
when
MACOSX_DEPLOYMENT_TARGET
is
set
in
shell
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment