Skip to content

Conversation

gyermolenko
Copy link
Contributor

Current example of Flyweight has actually two of them: with overriding __new__ and with metaclass.
I found the one with metaclass especially hard to follow and decided to split-up the examples.

What this PR does:

  • move metaclass example to a separate file
  • move from printing outputs to doctest style
  • add a bunch of comments and a link to Brandon Rhodes blog post about flyweights

@codecov-io
Copy link

Codecov Report

Merging #291 into master will increase coverage by 0.17%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #291      +/-   ##
==========================================
+ Coverage   45.51%   45.69%   +0.17%     
==========================================
  Files          41       42       +1     
  Lines        1584     1578       -6     
==========================================
  Hits          721      721              
+ Misses        863      857       -6
Impacted Files Coverage Δ
...tterns/structural/flyweight_with_metaclass__py3.py 0% <0%> (ø)
patterns/structural/flyweight__py3.py 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 27395d8...76bc024. Read the comment docs.

@faif faif merged commit fc3d072 into faif:master Apr 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants