Factory Pattern in Python by Example - Q&A Thursdays

preview_player
Показать описание
The factory pattern lets us define how to create an object given some source data. Learn how to implement it using Python.

The factory pattern allows us to move the transformation of the source data into an appropriate format for the class constructor into a factory function. Take a look at the example for more info!

-- Links --

Рекомендации по теме
Комментарии
Автор

the video format is great, much better than reading an ariticle about it. Keep it up!

juanfgomeza
Автор

Keep these coming! Series, one-shot, whatever...this video is the way it should be. ANY deep-dive topic you can provide is priceless -- especially if you go into microscopic detail about a topic that is vague or confusing "on the surface".

dcc
Автор

Excellent job! Your didactic approach is straightforward, no bs, I loved it. Please make more content like this one.

igordc
Автор

I like the idea and would appreciate more short topics like this.

DanBarnett-bb
Автор

This is great! Please continue with the video format Jose!! Thank you

vishalmatam
Автор

Absolutely, more! This is a great format. Keep them coming!

JeffreyDavidGordon
Автор

Hi Jose. Very clear and short/to the point which really helps. I would like to see more on design patterns with examples. Maybe an example showing dependency injection/inversion of control would be great

shaunypie
Автор

yes this is very useful, hope to see more on this

jacobthomas
Автор

Hi! You should make this kind of video each day! Always eager to learn!

JustFuguFish
Автор

The video format is really cool, addressing one issue only and going through with a practical example, for me is the way to go.
The cursor on that size was a drowning too much attention at first, but I got used to it after a while, for me is the only remark.

lchevalier
Автор

This is very useful. Thank you for the information. I hope to see more in the future at whatever frequency is good for you.

MichaelCole-om
Автор

Excellent Video! I enjoy these types of videos, and it helps me learn a lot. Keep them coming

GarimellaProduction
Автор

Great idea Jose. I vote for a Python pattern design series. Thank you.

nisidabay
Автор

This made me subscribe! Great tutorial man

jake
Автор

It's a really good video, I'm sure there are better ways to read a csv file, but it's impressive to implement a factory pattern using classmethods.

tpag
Автор

Great video - thanks for sharing. Happy to see more like this. However, in future videos please do less zooming in and out, or maybe do it slower - I found that a little distracting.

SeanHouse
Автор

Screen zooming in and out feature is very cool, but annoying. BTH Thanks for the video

ПавелШаламов-жд
Автор

Better if you show, how to convert multiple CSV file format using a common factory method. Factory design pattern helps creation of right class instance from one method. Each classes suppose to implement same interface.

manmohanmundhraa
Автор

In the Line 10 why have you used asterisk (*) return cls(*line.strip().split(", ") ) Thanks in advance.

mooneesh
Автор

You can't parse CSV data just by splitting it on a comma. Suppose a person's name is "John Wittingham, second earl of Westchester". It would erroneously split on the comma in the name. You really should use the 'csv' standard library for this. Apart from that, a great presentation.

PaulaBean