• Home
  • About
    • About The Coder
    • Language List
  • Code Rules
    • #1: Clarity Trumps Everything
    • #2: Source Code is for Humans
    • #3: Don’t Ignore Warnings
    • #4: Comment As You Go
    • #5: Always Use Parentheses
    • #6: Always Define Literals
    • #7: Never Repeat Yourself
  • CS-101
  • Python-101
  • Simple Tricks
  • Guestbook

The Hard-Core Coder

~ I can't stop writing code!

The Hard-Core Coder

Monthly Archives: October 2024

Simple Python Tricks #10

28 Monday Oct 2024

Posted by Wyrd Smythe in Python

≈ 4 Comments

Tags

Python classes, Python code, Simple Tricks, sub-class

Last time, Simple Tricks looked at some built-in Python functions. This time, we look at three built-in Python container classes, tuple, list, and dict, with a focus on designing useful sub-classes based on them.

We’ll explore the built-in __new__ and __init__ methods in detail along with some of the other built-in methods that help you to create rich new types. [The reader is assumed to be familiar with the basics of object-oriented programming.]

Continue reading →

Simple Python Tricks #9

14 Monday Oct 2024

Posted by Wyrd Smythe in Python

≈ 3 Comments

Tags

Python code, Simple Tricks

For many, fall means back to school, so for this blog I thought I’d return to Simple Tricks in Python. Fall also means Halloween for many, so hopefully these tricks will be treats, even if they do involve some very basic Python.

In this post, I explore some of Python’s more interesting and useful built-in functions, such as enumerate, sorted, reversed, map, and filter.

Continue reading →

Follow The Hard-Core Coder on WordPress.com

The Posts

  • Python Tk Calculator App
  • Tk Windows in Python
  • Dual Numbers in Python
  • Python Decorators, more
  • Python Decorators, redux
  • Byte Multiplication Trick
  • Parsing Multipart Form Data
  • Simple Python Tricks #18
  • Simple Python Tricks #17
  • Simple Python Tricks #16

The Topics

  • Blog (4)
  • CS101 (37)
  • Fun (36)
  • Interesting (5)
  • Opinion (12)
  • Python (59)
  • Stories (15)

The Month

October 2024
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  
« Sep   Nov »

The Past

Posts

RSS Feed

Comments

RSS Feed

The Main Blog

Visit Logos con carne

Lots of wyrds... with meat!

The Author

Wyrd Smythe

Wyrd Smythe

The canonical fool on the hill watching the sunset and the rotation of the planet and thinking what he imagines are large thoughts.

View Full Profile →

Create a website or blog at WordPress.com

  • Subscribe Subscribed
    • The Hard-Core Coder
    • Already have a WordPress.com account? Log in now.
    • The Hard-Core Coder
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar