Beau's Journal: Cyber Mnemonics. Syntax, Structure, and stuff

Today I refigured my alphabetical index of Python 3.12’s built-in functions (there’s 70).

Here are 4 (mnemonic) indexes I use with the goals of:

  1. locate functions by Functional Category
  2. locate functions by name
  3. locate functions Alphabetically
  4. know all arguments for each function (and all available variations of arguments taken, ie, their “signatures”)
Index 1: by Functionality ---

organized in in a 3 layer hierarchy

  • Overarching category

    • Functional Category
      • Actual Functions (not listed below)
  • Fundamental Concepts:

    • Logical and Mathematical Functions
    • Numeric and Byte-related functions
    • Character Manipulation functions
  • Data Structures and Collections

    • Collections and Sequence Functions
    • Iteration and Access
  • Object and Type Handling

    • Object Properties and Introspection
    • Class/Type Management
  • File and System Operations

    • System/Module Utilities
    • File Operations
  • Advanced Programming Concepts

  • Code Development & Execution

    • Code Processing
    • Debug/Dev tools
  • User Interaction and Output

    • interactivity
    • printing
    • formatting

_

Index 2: by Number of Variations of Minimally Required Signatures ----
  • Functions with a total of 3 signature variations (only counting the minimally required arguments)
    • Example: min(), max(), dict(), bytes(), bytearray()
  • Functions with 2 total signature variations
    • Example: complex(), int(), str(), list(), etc…

_

Index 3: by Number of minimally required available arguments—with argument names ----
  • 5 or more:
    • 8
    • 6
    • 5
  • 4
  • 3
  • 2
  • 0

_

Index 4: by Number of Functions starting with a particular character or letter ----

(example:
8 functions start with ‘S’;
6 functions start with ‘A’, 6 with ‘I’;
5 functions start with ‘B’, 5 with ‘C’;
. . .
2 functions start with ‘G’, 2 with ‘T’;
etc)

I use a sentence style index in descending order.

The order of letters, in descending quantity of function names starting with the letter:

  • S: (8 functions start with S)
  • A, I: (6 functions per letter)
  • B, C: (5 functions/letter)
  • D, F, H, M, O, R: (4 functions/letter)
  • E, L, P: (3 functions/letter)
  • G, T: (2 functions/letter)
  • N, Z, _: (each has only one function starting with that character)

My sentence index works with this information.

  • 1st word: starts with ‘S’ and is 8 letters long

  • 2nd & 3rd words: start with ‘A’ and ‘I’ and are each 6 letters long

  • 4th & 5th words: start with ‘B’ and ‘C’ and are each 5 letters long

  • D, F, H, M, O, R: there are 4 functions for each letter.

    • Because of that, I created a separate phrase using ONLY these letters (I used a Letter Bank, which is like an anagram but you can repeat letters)
    • My phrase for these: “Horror, Mr Frodo”
  • E, L, P: have 3 letters per word (ie, 3 functions per alphabetical starting letter)

  • G, T: both words are only 2 letters long

  • N, Z, _: each of these characters is only associated with 1 function.

    • The words chosen are arbitrary, as these come last in the sentence. If they kept with the pattern they would only use one letter apiece, but it’s pretty clear why something like ‘New Zealand__’ is appearing at the end, after the two letter words..

_

1 Like