Bite 11. Enrich a class with dunder methods
|
|
Let's enrich an Account class by adding dunder (aka special) …
3.10
dunder methods
functools
properties
|
|
Bite 20. Write a context manager
|
|
Write a context manager to roll back a transaction on …
3.10
context managers
dunder methods
operator overloading
with statement
|
|
Bite 59. Create a multiplication table class of variable length
|
|
Danny does not like rote learning (nor do we!). He …
3.10
classes
dunder methods
exception handling
numbers
|
|
Bite 34. Building a Karma app - implement the User class
|
|
This Bite is about implementing a User class that keeps …
3.10
classes
dunder methods
namedtuple
operator overloading
properties
|
|
Bite 31. Matrix multiplication / @ operator
|
|
Since 3.5 Python has a binary operator to be used …
3.10
dunder methods
__matmul__
operator overloading
|
|
Bite 71. Keep state in a class + make its instance callable
|
|
In this Bite you write a small class to keep …
3.10
classes
dunder methods
|
|
Bite 158. Subclass the list built-in
|
|
In this Bite you will complete IntList, a subclass of …
3.10
dunder methods
exception handling
inheritance
list
mean
median
operator overloading
properties
statistics
|
|
Bite 167. Complete a User class: properties and representation dunder methods
|
|
In this Bite you are presented with another class, User …
3.10
classes
dunder methods
f-strings
properties
__repr__
__str__
string manipulation
|
|
Bite 168. Ninja Rankings
|
|
PyBites is starting a campaign to try and pair up …
3.10
bisect
classes
dataclasses
dunder methods
heapq
tuples
|
|
Bite 230. Thumbs up for operator overloading
|
|
In this Bite we learn a bit of operator overloading. …
3.10
classes
dunder methods
emojis
exception handling
operator overloading
|
|
Bite 320. sortable dataclasses and enums
|
|
Write an enum called BiteLevel and a dataclass called Bite …
3.10
dataclasses
dunder methods
enum
sorting
|
|
Newbie Bite 38. Class With Str
|
|
This Bite continues where the previous class Bite left off. …
3.10
classes
dunder methods
newbie
|
|
Newbie Bite 31. Word Count
|
|
In this bite, we are going to explore two useful …
3.10
methods
newbie
strings
|
|
Bite 13. Convert dict to namedtuple/json
|
|
Write a function to convert the given blog dict to …
3.10
dict
json
namedtuple
|
|
Bite 24. ABC's and class inheritance
|
|
ABC's or Abstract Base Classes are great to enforce a …
3.10
ABCs
abstractmethod
classes
inheritance
|
|
Bite 25. No promo twice, keep state in a class
|
|
In this bite a real world scenario: PyBites has a …
3.10
classes
exception handling
properties
|
|
Bite 40. Write a binary search algorithm
|
|
There are many ways to search for an item in …
3.10
algorithms
binary search
|
|
Bite 70. Create your own iterator
|
|
In this Bite you make an iterator called EggCreator by …
iterators
random
|
|
Bite 82. Define a Score Enum and customize it adding methods
|
|
Starting Python 3.4 there is support for enumerations (not to …
3.10
classmethod
enum
__str__
|
|
Bite 85. Write a score property
|
|
After Bite 19. Write a simple property let's write a …
3.10
classes
properties
|
|
Bite 89. Playing with lists and dicts
|
|
In this Bite you are presented with a us_state_abbrev dict …
3.10
data structures
dict
list
|
|
Bite 95. Subclass the dict built-in
|
|
In this Bite you will subclass the dict built-in to …
3.10
classes
inheritance
|
|
Bite 184. Analyze some Bite stats data
|
|
In this Bite we will look at some Bite stats …
3.10
Counter
csv
data analysis
set
|
|
Newbie Bite 13. Dict data retrieval methods
|
|
Excellent! We know what a dict is and what it …
3.10
newbie
|
|
Bite 220. Analysing @pythonbytes RSS feed
|
|
Another feedparser exercise! In this Bite we're going to analyze …
3.10
classes
Counter
feedparser
max
min
namedtuple
regular expressions
string matching
type hinting
|
|
Bite 249. Test a movie DB class
|
|
Time for fixtures, one of pytest's killer features or as …
3.7
classes
fixtures
movie data
pytest
SQL
sqlite3
|
|
Bite 266. Composition, Inheritance, Abstract Base Class, what?
|
|
It’s not as bad as that sounds, really. If you …
3.10
ABCs
abstractmethod
beautifulsoup
composition
dataclasses
inheritance
namedtuple
string formatting
typing
urllib
web scraping
|
|
Bite 269. Taxable Income Calculator
|
|
I have no idea what rabbit hole I followed to …
3.10
classes
dataclasses
finance
namedtuple
properties
typing
|
|
Bite 307. SQLite3 introduction
|
|
In this Bite, you are going to get some practice …
3.10
databases
SQL
sqlite3
|
|
Bite 309. A simple document class
|
|
When we want to transform our data often, method chaining …
3.10
annotations
classes
method chaining
properties
string
|
|
Bite 327. AST visitor
|
|
In Bite 312 we learned how to identify builtin functions, …
3.10
AST
|
|
Bite 370. Getting started with vectors
|
|
In the previous two Bites you have annotated small pieces …
3.10
annotations
type hinting
|
|