Quantcast
Channel: Planet Python
Viewing all articles
Browse latest Browse all 23441

Python Morsels: Python Terminology: an unofficial glossary

$
0
0

Definitions for colloquial Python terminology (effectively an unofficial version of the Python glossary).

Looping

These terms are all about looping and objects you can loop over.

Iteration

Looping over an iterable object.

A for loop is the epitome of iteration, but there are many other ways to iterate over an iterable in Python.

List comprehensions iterate. Tuple unpacking iterates. Using * operator in a function call iterates (see Unpacking iterables into function arguments). Using * operator in a list literal iterates (see Unpacking iterables into iterables).

Iterable

(Our perspective as Python users) Anything you can loop over with a for loop or by various other forms of iteration. More on iterables in What is an iterable.

(Python's perspective) Anything that can be passed to the built-in iter function to get an iterator from it. If you're inventing your own iterable class, also see How to make an iterable.

Data Types

These terms are related to …

Read the full article: https://www.pythonmorsels.com/terms/


Viewing all articles
Browse latest Browse all 23441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>