On 7/29/17 5:12 AM, ttopolew...@gmail.com wrote: > Hello, > I'm wondering what do You think about some default logging that can become a > part of the Python language and part of the development workflow. > > I would see it as develop in debug mode untill debug is removed intentionally. > It would include: > - standard logging location for new development > - some incentive to remove logging > > > For example new keyword defd - something that would: > - act as regular def, but log own identification and input/output __repr__ to > /var/log/{processname.processid} > - send WARN to stdout if filename of function/method defd definition time is > old(like 2y.o?) to make people to replace defd as regular def > > > PS. I don't have example implementation and I have not tried such approach so > I can't say by experience if it makes any sense. But still I think it can be > at least something to consider. > This sounds like a great thing to provide as a library. There's no need for a new keyword. A function decorator could do what you are describing.
--Ned. -- https://mail.python.org/mailman/listinfo/python-list