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
ffefd5a8
Kaydet (Commit)
ffefd5a8
authored
Tem 29, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix some markup and small factual glitches found by M. Markert.
üst
07e20f87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
14 deletions
+18
-14
modules.rst
Doc/tutorial/modules.rst
+9
-8
stdlib2.rst
Doc/tutorial/stdlib2.rst
+9
-6
No files found.
Doc/tutorial/modules.rst
Dosyayı görüntüle @
ffefd5a8
...
...
@@ -446,14 +446,14 @@ one would hope that this somehow goes out to the filesystem, finds which
submodules
are
present
in
the
package
,
and
imports
them
all
.
Unfortunately
,
this
operation
does
not
work
very
well
on
Windows
platforms
,
where
the
filesystem
does
not
always
have
accurate
information
about
the
case
of
a
filename
!
On these platforms, there is no guaranteed way to know whether a file
filename
.
On
these
platforms
,
there
is
no
guaranteed
way
to
know
whether
a
file
:
file
:`
ECHO
.
PY
`
should
be
imported
as
a
module
:
mod
:`
echo
`,
:
mod
:`
Echo
`
or
:
mod
:`
ECHO
`.
(
For
example
,
Windows
95
has
the
annoying
practice
of
showing
all
file
names
with
a
capitalized
first
letter
.)
The
DOS
8
+
3
filename
restriction
adds
another
interesting
problem
for
long
module
names
.
The
only
solution
is
for
the
package
author
to
provide
an
explicit
index
of
the
package
.
The
import
statement
uses
the
following
convention
:
if
a
package
's
package
.
The
:
keyword
:`
import
`
statement
uses
the
following
convention
:
if
a
package
's
:file:`__init__.py` code defines a list named ``__all__``, it is taken to be the
list of module names that should be imported when ``from package import *`` is
encountered. It is up to the package author to keep this list up-to-date when a
...
...
@@ -474,16 +474,16 @@ been imported (possibly running any initialization code in :file:`__init__.py`)
and
then
imports
whatever
names
are
defined
in
the
package
.
This
includes
any
names
defined
(
and
submodules
explicitly
loaded
)
by
:
file
:`
__init__
.
py
`.
It
also
includes
any
submodules
of
the
package
that
were
explicitly
loaded
by
previous
import
statements
.
Consider
this
code
::
previous
:
keyword
:`
import
`
statements
.
Consider
this
code
::
import
sound
.
effects
.
echo
import
sound
.
effects
.
surround
from
sound
.
effects
import
*
In
this
example
,
the
echo
and
surround
modules
are
imported
in
the
current
namespace
because
they
are
defined
in
the
:
mod
:`
sound
.
effects
`
package
when
th
e
``
from
...
import
``
statement
is
executed
.
(
This
also
works
when
``
__all__
``
is
defined
.)
In
this
example
,
the
:
mod
:`
echo
`
and
:
mod
:`
surround
`
modules
are
imported
in
the
current
namespace
because
they
are
defined
in
the
:
mod
:`
sound
.
effects
`
packag
e
when
the
``
from
...
import
``
statement
is
executed
.
(
This
also
works
when
``
__all__
``
is
defined
.)
Note
that
in
general
the
practice
of
importing
``*``
from
a
module
or
package
is
frowned
upon
,
since
it
often
causes
poorly
readable
code
.
However
,
it
is
okay
to
...
...
@@ -546,5 +546,6 @@ modules found in a package.
.. rubric:: Footnotes
.. [#] In fact function definitions are also '
statements
' that are '
executed
'; the
execution enters the function name in the module'
s
global
symbol
table
.
execution of a module-level function enters the function name in the module'
s
global
symbol
table
.
Doc/tutorial/stdlib2.rst
Dosyayı görüntüle @
ffefd5a8
...
...
@@ -347,12 +347,15 @@ Decimal Floating Point Arithmetic
The :mod:`decimal` module offers a :class:`Decimal` datatype for decimal
floating point arithmetic. Compared to the built-in :class:`float`
implementation of binary floating point, the new class is especially helpful for
financial applications and other uses which require exact decimal
representation, control over precision, control over rounding to meet legal or
regulatory requirements, tracking of significant decimal places, or for
applications where the user expects the results to match calculations done by
hand.
implementation of binary floating point, the class is especially helpful for
* financial applications and other uses which require exact decimal
representation,
* control over precision,
* control over rounding to meet legal or regulatory requirements,
* tracking of significant decimal places, or
* applications where the user expects the results to match calculations done by
hand.
For example, calculating a 5% tax on a 70 cent phone charge gives different
results in decimal floating point and binary floating point. The difference
...
...
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