8000 small things · pennli/python-tutorial@f7fe875 · GitHub
[go: up one dir, main page]

Skip to content

Commit f7fe875

Browse files
committed
small things
1 parent 729d281 commit f7fe875

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

advanced/datatypes.md

Lines changed: 1 addition & 1 deletion
< 8000 ul aria-label="File view" class="prc-SegmentedControl-SegmentedControl-e7570 mx-2" data-size="small">
  • Original file line numberDiff line numberDiff line change
    @@ -55,7 +55,7 @@ True
    5555

    5656
    We can also convert anything [iterable](../basics/loops.md#summary) to a
    5757
    set [by calling the
    58-
    class](../basics/classes.md#why-should-i-use-custom-classes-in-my-projects).
    58+
    class](../basics/classes.md#what-are-classes).
    5959

    6060
    ```python
    6161
    >>> set('hello')

    basics/classes.md

    Lines changed: 8 additions & 8 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,13 +1,13 @@
    1-
    # Defining and using custom classes in Python
    1+
    # Defining and using custom classes
    22

    33
    When I was getting started in Python I learned to make classes for
    44
    tkinter GUI's before I 8000 understood how they work. Everything I did with
    55
    classes worked, but I didn't understand how. Hopefully you'll first
    66
    learn to understand classes, and then learn to use them.
    77

    8-
    ## Why should I use custom classes in my projects?
    8+
    ## What are classes?
    99

    10-
    Python comes with a lot of classes that you are already familiar with.
    10+
    Python comes with many classes that we know already.
    1111

    1212
    ```python
    1313
    >>> str
    @@ -51,11 +51,11 @@ We can also get an instance's class with `type()`:
    5151
    >>>
    5252
    ```
    5353

    54-
    Let's say you make a program that processes data about websites. With a
    55-
    custom class, you're not limited to `str`, `int` and other classes
    56-
    Python comes with. Instead you can define a Website class, and make
    57-
    Websites and process information about websites directly. Defining your
    58-
    own object types like this is called **object-orientated programming**.
    54+
    Let's say that we make a program that processes data about websites.
    55+
    With a custom class, we're not limited to `str`, `int` and other classes
    56+
    Python comes with. Instead we can define a Website class, and make
    57+
    Websites and process information about websites directly. Defining our
    58+
    own types like this is called **object-orientated programming**.
    5959

    6060
    ## First class
    6161

    0 commit comments

    Comments
     (0)
    0