jeffgortmaker / pyblp

BLP Demand Estimation with Python
https://pyblp.readthedocs.io
MIT License
240 stars 83 forks source link

Use warnings library for warnings #83

Closed fpinter closed 3 years ago

fpinter commented 3 years ago

I often keep pyblp.options.verbose = False when I'm doing repeated simulations, because it clogs up stdout. But that means I also miss warnings, like the one you (helpfully) implemented in 63c809d. Would it be possible to implement warnings using Python's warning framework? That way they get sent to stderr (instead of stdout) or another place I choose, and also pyblp.options.verbose doesn't shut them off.

This is not a high-priority item, but I thought I'd put it here in case others might also want it.

jeffgortmaker commented 3 years ago

Yeah that's a great suggestion, thanks. I'll keep it open for when I have a chance.