the uml class diagram for an abstract factory pattern is hard to understand without specific exampleso let' turn things around and create concrete example first we'll create set of formatters that depend on specific locale and help us format dates and currencies there will be an abstract factory class that picks the specific factoryas well as couple example concrete factoriesone for france and one for the usa each of these will create formatter objects for dates and timeswhich can be queried to format specific value here' the diagramformatterfactory +create_date_formatter(+create_currency_formatter(usaformatterfactory franceformatterfactory +create_date_formatter(+create_currency_formatter(+create_date_formatter(+create_currency_formatter(usadateformatter francedateformatter usacurrencyformatter francecurrencyformatter +format_date(+format_date(+format_currency(+format_currency(dateformatter currencyformatter +format_date(+format_currency(comparing that image to the earlier simpler text shows that picture is not always worth thousand wordsespecially considering we haven' even allowed for factory selection code here of coursein pythonwe don' have to implement any interface classesso we can discard dateformattercurrencyformatterand formatterfactory the formatting classes themselves are pretty straightforwardif verboseclass francedateformatterdef format_date(selfymd)ymd (str(xfor in ( , , ) ' if len( = else ' if len( = else ' if len( = else return("{ }/{ }/{ }format( , , )class usadateformatter