18. Using classes in python

Опубликовано: 16 Октябрь 2024
на канале: Taylor Sparks
1,454
36

Classes are a super helpful data type in python. We can create objects that share similar information types. This video shows an example of classes where we create members of Bravais lattice and store relevant information like crystal system or centering as fields within the class. We can then create various instances of the class for different elements and store their information in a compact, useful way. We can also define custom methods and use a helpful initialization function as well as write help documentation for the class so we remember what the class was later ;)

00:00 what are classes?
3:30 help and initialization
9:08 custom methods
11:38 example of classes to classify Bravias lattices