Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
bc4af35f
Kaydet (Commit)
bc4af35f
authored
May 22, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#6086: fix spelling and use a better exception to catch.
üst
346a38db
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
doanddont.rst
Doc/howto/doanddont.rst
+5
-5
urllib2.rst
Doc/howto/urllib2.rst
+1
-1
No files found.
Doc/howto/doanddont.rst
Dosyayı görüntüle @
bc4af35f
...
@@ -30,7 +30,7 @@ Inside Function Definitions
...
@@ -30,7 +30,7 @@ Inside Function Definitions
``from module import *`` is *invalid* inside function definitions. While many
``from module import *`` is *invalid* inside function definitions. While many
versions of Python do not check for the invalidity, it does not make it more
versions of Python do not check for the invalidity, it does not make it more
valid, no more th
e
n having a smart lawyer makes a man innocent. Do not use it
valid, no more th
a
n having a smart lawyer makes a man innocent. Do not use it
like that ever. Even in versions where it was accepted, it made the function
like that ever. Even in versions where it was accepted, it made the function
execution slower, because the compiler could not be certain which names are
execution slower, because the compiler could not be certain which names are
local and which are global. In Python 2.1 this construct causes warnings, and
local and which are global. In Python 2.1 this construct causes warnings, and
...
@@ -111,7 +111,7 @@ Good examples::
...
@@ -111,7 +111,7 @@ Good examples::
from module import name1, name2
from module import name1, name2
-------------------------------
-------------------------------
This is a "don't" which is much weaker th
e
n the previous "don't"s but is still
This is a "don't" which is much weaker th
a
n the previous "don't"s but is still
something you should not do if you don't have good reasons to do that. The
something you should not do if you don't have good reasons to do that. The
reason it is usually bad idea is because you suddenly have an object which lives
reason it is usually bad idea is because you suddenly have an object which lives
in two separate namespaces. When the binding in one namespace changes, the
in two separate namespaces. When the binding in one namespace changes, the
...
@@ -245,11 +245,11 @@ Using the Batteries
...
@@ -245,11 +245,11 @@ Using the Batteries
Every so often, people seem to be writing stuff in the Python library again,
Every so often, people seem to be writing stuff in the Python library again,
usually poorly. While the occasional module has a poor interface, it is usually
usually poorly. While the occasional module has a poor interface, it is usually
much better to use the rich standard library and data types that come with
much better to use the rich standard library and data types that come with
Python th
e
n inventing your own.
Python th
a
n inventing your own.
A useful module very few people know about is :mod:`os.path`. It always has the
A useful module very few people know about is :mod:`os.path`. It always has the
correct path arithmetic for your operating system, and will usually be much
correct path arithmetic for your operating system, and will usually be much
better th
e
n whatever you come up with yourself.
better th
a
n whatever you come up with yourself.
Compare::
Compare::
...
@@ -284,7 +284,7 @@ Using Backslash to Continue Statements
...
@@ -284,7 +284,7 @@ Using Backslash to Continue Statements
======================================
======================================
Since Python treats a newline as a statement terminator, and since statements
Since Python treats a newline as a statement terminator, and since statements
are often more th
e
n is comfortable to put in one line, many people do::
are often more th
a
n is comfortable to put in one line, many people do::
if foo.bar()['first'][0] == baz.quux(1, 2)[5:9] and \
if foo.bar()['first'][0] == baz.quux(1, 2)[5:9] and \
calculate_number(10, 20) != forbulate(500, 360):
calculate_number(10, 20) != forbulate(500, 360):
...
...
Doc/howto/urllib2.rst
Dosyayı görüntüle @
bc4af35f
...
@@ -311,7 +311,7 @@ geturl, and info, methods. ::
...
@@ -311,7 +311,7 @@ geturl, and info, methods. ::
>>> req = urllib2.Request('http://www.python.org/fish.html')
>>> req = urllib2.Request('http://www.python.org/fish.html')
>>> try:
>>> try:
>>> urllib2.urlopen(req)
>>> urllib2.urlopen(req)
>>> except
URL
Error, e:
>>> except
HTTP
Error, e:
>>> print e.code
>>> print e.code
>>> print e.read()
>>> print e.read()
>>>
>>>
...
...
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