Michael Markert avatar Michael Markert committed 52409db

Updated translation and english sources to r84907.

Comments (0)

Files changed (7)

english-sources/classes.rst

    StopIteration
 
 Having seen the mechanics behind the iterator protocol, it is easy to add
-iterator behavior to your classes.  Define a :meth:`__iter__` method which
+iterator behavior to your classes.  Define an :meth:`__iter__` method which
 returns an object with a :meth:`__next__` method.  If the class defines
 :meth:`__next__`, then :meth:`__iter__` can just return ``self``::
 
            self.index = self.index - 1
            return self.data[self.index]
 
-   >>> for char in Reverse('spam'):
+   >>> rev = Reverse('spam')
+   >>> iter(rev)
+   <__main__.Reverse object at 0x00A1DB50>
+   >>> for char in rev:
    ...     print(char)
    ...
    m

english-sources/datastructures.rst

 
 Here is a brief demonstration::
 
-   >>> basket = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana']
-   >>> fruit = set(basket)               # create a set without duplicates
-   >>> fruit
-   {'orange', 'pear', 'apple', 'banana'}
-   >>> fruit = {'orange', 'apple'}       # {} syntax is equivalent to [] for lists
-   >>> fruit
-   {'orange', 'apple'}
-   >>> 'orange' in fruit                 # fast membership testing
+   >>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'}
+   >>> print(basket)                      # show that duplicates have been removed
+   {'orange', 'bananna', 'pear', 'apple'}
+   >>> 'orange' in basket                 # fast membership testing
    True
-   >>> 'crabgrass' in fruit
+   >>> 'crabgrass' in basket
    False
 
    >>> # Demonstrate set operations on unique letters from two words

english-sources/floatingpoint.rst

 values share the same approximation, any one of them could be displayed
 while still preserving the invariant ``eval(repr(x)) == x``.
 
-Historically, the Python prompt and built-in :func:`repr` function would chose
+Historically, the Python prompt and built-in :func:`repr` function would choose
 the one with 17 significant digits, ``0.10000000000000001``.   Starting with
 Python 3.1, Python (on most systems) is now able to choose the shortest of
 these and simply display ``0.1``.

english-sources/inputoutput.rst

    builtin: open
    object: file
 
-:func:`open` returns a file object, and is most commonly used with two
-arguments: ``open(filename, mode)``.
+:func:`open` returns a :term:`file object`, and is most commonly used with
+two arguments: ``open(filename, mode)``.
 
 ::
 

source/classes.rst

            self.index = self.index - 1
            return self.data[self.index]
 
-    >>> for char in Reverse('spam'):
+    >>> rev = Reverse('spam')
+    >>> iter(rev)
+    <__main__.Reverse object at 0x00A1DB50>
+    >>> for char in rev:
     ...     print(char)
     ...
     m

source/datastructures.rst

 
 Hier eine kurze Demonstration::
 
-   >>> basket = ['Apfel', 'Orange', 'Apfel', 'Birne', 'Orange', 'Banane']
-   >>> fruit = set(basket)               # eine Menge ohne Dublikate erstellen
-   >>> fruit
+   >>> basket = {'Apfel', 'Orange', 'Apfel', 'Birne', 'Orange', 'Banane'}
+   >>> print(fruit)                       # zeigt, dass die Duplikate entfernt wurden
    {'Orange', 'Birne', 'Apfel', 'Banane'}
-   >>> fruit = {'Orange', 'Apfel'}       # {}-Syntax analog der [] von Listen
-   >>> fruit
-   {'Orange', 'Apfel'}
-   >>> 'Orange' in fruit                 # schnelles Testen auf Mitgliedschaft
+   >>> 'Orange' in basket                 # schnelles Testen auf Mitgliedschaft
    True
-   >>> 'Fingerhirse' in fruit
+   >>> 'Fingerhirse' in basket
    False
 
    >>> a = set('abracadabra')

source/inputoutput.rst

    builtin: open
    object: file
 
-:func:`open` gibt ein Dateiobjekt zurück und wird meistens mit zwei Argumenten
+:func:`open` gibt ein Dateiobjekt (:term:`file object`) zurück und wird meistens mit zwei Argumenten
 aufgerufen: ``open(filename, mode)``
 
 ::
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.