Ionel Cristian Mărieș
blog.ionelmc.ro · Personal blog · on HN since 2013
Ionel Cristian Mărieș writes about Python internals, packaging, performance and software development practices, plus some Django and MySQL topics.
What HN saysHN commenters cite his posts on Python metaclasses and the src packaging layout as useful references, one calling the metaclass breakdown in-depth.
32HN people shared it
8linked it in comments
30stories submitted
539story points
2 years agolast shared
2013people per year2026
Most-shared posts
- 1Understanding Python Metaclasses (2015)7 people · 13 points · first shared 2015 · 2 comments on HN
- 2Terrible choices: MySQL (2014)6 people · 69 points · first shared 2014 · 28 comments on HN
- 3Packaging a Python Library6 people · 16 points · first shared 2014 · discussion on HN
- 4An underrated feature in Python 33 people · 208 points · first shared 2014 · 41 comments on HN
- 5Memory use and speed of JSON parsers3 people · 100 points · first shared 2015 · 13 comments on HN
- 6The problem with packaging in Python3 people · 48 points · first shared 2015 · 45 comments on HN
- 7Adding Django stacktraces to log messages2 people · 2 points · first shared 2013 · discussion on HN
- 8Sins of software development1 people · 56 points · first shared 2014 · 41 comments on HN
- 9Python debugging tools1 people · 13 points · first shared 2013 · discussion on HN
- 10Python's Tox tricks and patterns (2015)1 people · 5 points · first shared 2017 · discussion on HN
- 11Dealing with Docker (in Python apps)1 people · 3 points · first shared 2016 · discussion on HN
- 12Notes on Debugging1 people · 2 points · first shared 2022 · discussion on HN
- 13Dealing with eval'd code1 people · 2 points · first shared 2013 · discussion on HN
- 14Speeding Up Django Pagination1 people · 1 points · first shared 2020 · discussion on HN
- 15Ramblings about data-structures1 people · 1 points · first shared 2014 · discussion on HN
What HN people wrote when they linked it
pansa2 · 2025-01-11
This sort of thing makes me think Python is very complex:
What `instance.foobar` actually does: https://blog.ionelmc.ro/2015/02/09/understanding-python-metaclasses/#o…
Unless `instance` is actually a class, in which case it does: https://blog.ionelmc.ro/2015/02/09/understanding-python-metaclasses/#c…
Unless it's looking up a special method (`__add__` etc), in which case it does something different again.
This is much more complex than say, Ruby, which does the same thing in all three cases.
dannyboland · 2022-07-28
Yeah, I adopted the “src” dir layout after reading this post some time back:
https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure
It describes some of the outdated motivations for the other layouts commonly seen with python, as well as the many benefits of the “src” layout.
nmalaguti · 2019-02-13
The src directory is becoming a popular option. See https://blog.ionelmc.ro/2014/05/25/python-packaging/#the-structure for an enumeration of the reasons.
Another resource might be https://hynek.me/articles/testing-packaging/
florabuzzword · 2018-08-09
Wonderful. I’ve never seen this resource before.
A related article I got a lot out of was ‘Understanding Python Metaclasses’, an in-depth breakdown of Python class instantiation. Here’s the link to that:
https://blog.ionelmc.ro/2015/02/09/understanding-python-metaclasses/
veeti · 2016-10-04
> I have one package manager: pip. It works
Funny, because this is not the general sentiment in the Python community. See links like [1], [2], [3]. Thankfully, things are improving.
[1] http://lucumr.pocoo.org/2012/6/22/hate-hate-hate-everywhere/
[2] https://www.reddit.com/r/Python/comments/zrm3h/there_have_been_a_strin…
[3] https://blog.ionelmc.ro/2015/02/24/the-problem-with-packaging-in-pytho…
dijit · 2016-04-04
Sure, but adding too many sources will make me seem snide or bitter.
But as an example:
https://www.youtube.com/watch?v=emgJtr9tIME
MySQL vs PostgreSQL - Why you shouldn't use MySQL
https://dev.mysql.com/doc/refman/5.5/en/glossary.html#glos_autocommit
http://grimoire.ca/mysql/choose-something-else
https://blog.ionelmc.ro/2014/12/28/terrible-choices-mysql/
the fact that https://dev.mysql.com/doc/refman/5.6/en/mysql-real-escape-string.html has to exist because https://dev.mysql.com/doc/refman/5.6/en/mysql-escape-string.html doesn't work properly. (this is actually blamed on PHP a lot)
My favorite MySQL gotcha is that if you issue a GRANT statement with a typo in the user's name instead giving a "user does not exist" error it simply creates a new user with the misspelled name.
a_bonobo · 2015-06-27
Python 3 has changed the "standard" traceback to be more readable and include more information, maybe that one is more to your liking: http://blog.ionelmc.ro/2014/08/03/the-most-underrated-feature-in-pytho…
ionelm · 2013-12-22
I suppose it's not that hard [1] to write a logging filter to display SQL just like devserver does but without all that monkeypatching ?
[1] http://blog.ionelmc.ro/2013/12/10/adding-stacktraces-to-log-messages/