Some examples and code written in python for didactic purpose
- conditional.py : if statement.
- functions.py : basic knoledge about functions.
- while.py : while, break, continue and the try statement.
- for.py : for loop.
- classes.py : basic knoledge about classes.
- References.py : variables are memory references.
- ReferenceCounting.py : reference counting.
- GarbageCollection.py : garbage collection.
- DynamicType.py : dynamic typing.
- Re-Assignment.py : variable re-assignment.
- ObjectMutability.py : object mutability.
- FunctionArgMutability.py : function arguments and mutability.
- SharedRefMutability.py : shared references and mutability.
- Equality.py : variable equality ("==" vs "is").
- EverythingObject.py : everything is an object.
- IntegerInterning.py : optimization about integer.
- StringInterning.py : optimization about string.
- Peephole.py : optimization about variables in functions.
- IntDataTypes.py : integers, data types.
- IntOperations.py : integers, operations.
- IntConstructorsBases.py : integers, constructors and bases.
- Rationals.py : rational numbers.
- FloatInternalRepresentation.py : floats, internal representations.
- FloatEqualityTesting.py : floats, equality testing.
- FloatCoercingToIntegers.py : floats, coercing to integers.
- FloatRounding.py : floats, rounding.
- DecimalCoding.py : decimals.
- DecimalConstructorContext.py : decimals, constructors and contexts.
- DecimalMathOperation.py : decimals, math operations.
- DecimalPerformance.py : decimals, performance considerations.
- Complex.py : complex numbers.
- Boolean.py : booleans.
- BooleanTruthValue.py : booleans, truth values.
- BooleanPrecedenceShortC.py : booleans, precedence and short-circuiting.
- BooleanOperators.py : booleans, boolean operators.
- ComparisonOperators.py : comparison operators.
- PositionalKeywordArg.py : positional and keyword arguments.
- UnpackingIterables.py : unpacking iterables.
- ExtendedUnpacking.py : extended unpacking.
- UnpackingArguments.py : *args.
- KeywordArguments.py : keyword arguments.
- AllTogether.py : putting it all together.
- ApplicationTimer.py : application timer.
- Beware.py : beware about parameter defaults.
- Docstrings.py : docstrings and annotations.
- LambdaExpressions.py : lambda expressions.
- LambdaSorting.py : lambdas and sorting.
- FunctionIntrospection.py : function introspection.
- Callables.py : callables.
- MapFilterZip.py : map, filter, zip and list comprehensions.
- ReducingFunctions.py : reducing functions.
- PartialFunctions.py : partial functions.
- OperatorModule.py : the operator module.
- GlobalLocalScopes.py : global and local scopes.
- NonlocalScopes.py : nonlocal scopes.
- Closures.py : closures.
- ClosuresApplications.py : closures applications.
- Decorators.py : decorators.
- DecoratorApplicationTiming.py : decorators application (timers).
- DecoratorApplicationLogger.py : decorators application (logger, stacked decorators).
- DecoratorApplicationMemoization.py : decorators application (memoization).
- DecoratorsFactory.py : decorator factory.
- DecoratorClass.py : decorator class.
- DecoratingClasses.py : decorating classes.
- DecoratorApplicationDispatching.py : decorator application (dispatching).
- TuplesDataStructure.py : tuples as data structures.
- NamedTuples.py : named tuples.
- NamedTuplesModifying.py : named tuples modifying and extending.
- NamedTuplesDocstring.py : named tuples docstrings and default values.
- NamedTuplesApplication.py :named tuples application - returning multiple values.
- NamedTuplesDictionaries.py : named tuples application - alternative to dictionaries.
- Module.py : what is a module?.
- example1 : import module example 1.
- example2 : import module example 2.
- example3 : import module example 3.
- Imports.py : imports and importlib.
- ImportVariants.py : import variants and misconceptions.
- ReloadingModules.py : reloading modules.
- MainUsage : using main.
- Packages : packages.
- PackagesStructuring : structuring packages.
- DictionaryOrder.py : dictionary ordering.
- PreservedOrderKwargs.py : preserved order of kwargs and named tuple application.
- f-Strings.py : f-Strings.
- RandomSeeds.py : random seeds.
- RandomChoices.py : random choices.
- RandomSample.py : random samples.
- Timing.py : timing code using timeit.
- NamesBlindly.py : don't use *args and **kwargs names blindly.
- CommandLineArgs : command line arguments.
- SentinelValues.py : sentinel values for parameter defaults.
- Switch.py : simulating a simple switch in Python.