Skip to content

Markdown Edge Cases #96

@szweibel

Description

@szweibel

Sometimes Markdown isn't rendered correctly, for instance:
<Secret/>
Definition:
Function: A function is a self-contained block of code that performs a specific task and can be defined independently of any class or object. It takes input arguments, processes them, and returns a result.
Method: A method is a function that is associated with an object or class. It is called on an object and can access the data within that object.

Usage:
Function: Functions are standalone entities and can be called from anywhere in the code, provided they are in the scope.
Method: Methods are associated with objects or classes and are called on instances of those objects or the class itself.

Syntax:
Function: Functions are defined using the def keyword and can be called using the function name.
Method: Methods also use the def keyword but are defined within a class and are accessed using dot notation (object.method() or class.method()).

Here's a simple example in Python to illustrate the differences:

    # function
    def add(a, b):
        return a + b

    # method
    class Math:
        def add(self, a, b):
            return a + b

    # function call
    add(1, 2)

    # method call
    Math().add(1, 2)

</Secret>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions