[Python-ideas] Re: Consider having numbers.Real provide __complex__?

2021-01-18 Thread Shantanu Jain
Yes, I believe the ask is for `int.__complex__`, `float.__complex__` and `complex.__complex__` ( https://github.com/python/mypy/issues/3186#issuecomment-762121456) On Mon, 18 Jan 2021 at 09:47, Mark Dickinson wrote: > Inheriting from `numbers.Real` _does_ give you `__complex__`, though: > https:

[Python-ideas] Re: Requirements.txt inside virtual environment

2022-02-17 Thread Shantanu Jain
`pip freeze` can be useful for this kind of thing On Thu, 17 Feb 2022 at 18:19, Chris Angelico wrote: > On Fri, 18 Feb 2022 at 13:12, Vishesh Mangla > wrote: > > > > Consider the following scenario: > > 1) You have to format your pc. > > 2) You copy your python projects to your hard disk along

[Python-ideas] Re: unix filter, one liners, awk

2020-11-14 Thread Shantanu Jain
Here's my take on a Python one liner tool: https://github.com/hauntsaninja/pyp It handles automatic intelligent printing, importing and more. It explicitly aims to feel very much like writing Python, as opposed to a DSL. In fact, it can even generate a runnable Python script to show you exactly wh

[Python-ideas] Re: Idea: Tagged strings in python

2022-12-18 Thread Shantanu Jain
collections.UserString can take away a lot of this boilerplate pain from user defined str subclasses. On Sun, Dec 18, 2022 at 7:28 PM Steven D'Aprano wrote: > On Sun, Dec 18, 2022 at 07:38:06PM -0500, David Mertz, Ph.D. wrote: > > > However, if you want to allow these types to possibly *do* some