Re: Weak Type Ability for Python

2023-04-13 Thread J. Pic
print(f'{x}{y}') ? On Wed, Apr 12, 2023 at 7:06 PM Ali Mohseni Roodbari < ali.mohseniroodb...@gmail.com> wrote: > Hi all, > Please make this command for Python (if possible): > > >>> x=1 > >>> y='a' > >>> wprint (x+y) > >>> 1a > > In fact make a new type of print command which can print and show

Re: Ad-hoc SQL query builder for Python3?

2021-04-24 Thread J. Pic
Maybe search or ask dba stackexchange for more, meanwhile, here's a popular one: https://github.com/dbeaver/dbeaver -- https://mail.python.org/mailman/listinfo/python-list

Re: do ya still use python?

2021-04-23 Thread J. Pic
CPython powers Mars Ingenuity Helicopter: https://github.com/readme/nasa-ingenuity-helicopter All CPython contributors got a new GitHub badge to show off. -- https://mail.python.org/mailman/listinfo/python-list

Re: editor recommendations?

2021-02-26 Thread J. Pic
On Fri, Feb 26, 2021 at 5:24 PM Rich Shepard wrote: > Perhaps he didn't but he should know that by opening a shell within emacs > he > can run his python code there. > :term in vim -- ∞ -- https://mail.python.org/mailman/listinfo/python-list

Re: Python 2.7 and 3.9

2021-02-17 Thread J. Pic
The best would be to upgrade the scripts, did you try them with 2to3 ? It should do most of the work, if not all. https://docs.python.org/3/library/2to3.html -- https://mail.python.org/mailman/listinfo/python-list

Re: Mutable defaults

2021-02-11 Thread J. Pic
Thu, Feb 11, 2021 at 6:03 PM Ross Wilson wrote: > > > > On Thu, 11 Feb 2564 BE at 12:52 Grant Edwards > > > wrote: > > > > > On 2021-02-11, J. Pic wrote: > > > > > > > I just meant removing the whole "default value mutating"

Re: Mutable defaults

2021-02-10 Thread J. Pic
. 2021 à 04:03, Chris Angelico a écrit : > On Thu, Feb 11, 2021 at 1:55 PM J. Pic wrote: > > > > Adding decorators with some inspect sauce could certainly work with the > syntax we already have: > > > > @default(x=lambda: copy([]), y=lambda x: len(x)) > > def foo(

Re: Mutable defaults

2021-02-10 Thread J. Pic
Silly me, we don't even need copy but just execution @lazy(x=lambda: [], y=lamba x: len(x)) def foo(x=None, y=None): So only one operator is needed, the walrus is still fine: def foo(x:=[], y:=len(x)): Not copy, just evaluate. Le jeu. 11 févr. 2021 à 03:54, J. Pic a écrit : >

Re: Mutable defaults

2021-02-10 Thread J. Pic
, Chris Angelico a écrit : > On Thu, Feb 11, 2021 at 12:56 PM J. Pic wrote: > > > > I just meant removing the whole "default value mutating" story, not > removing mutable variables. Really, I was wondering if there was a use case > where this actually turns to an advan

Re: Mutable defaults

2021-02-10 Thread J. Pic
; late-bound solution. > > On Thu, 2021-02-11 at 10:29 +1100, Chris Angelico wrote: > > On Thu, Feb 11, 2021 at 10:17 AM J. Pic wrote: > > > > > > > Most of us know of the perils of mutable default values. > > > > > > And those who don'

Re: Mutable defaults

2021-02-10 Thread J. Pic
> Most of us know of the perils of mutable default values. And those who don't pay the price. I wonder what would be the harm in removing them, or doing copy on call by default. -- https://mail.python.org/mailman/listinfo/python-list

Re: How do you debug in Python? Coming from a Matlab and R user. I'm already aware of pdb.

2021-01-27 Thread J. Pic
Also - https://github.com/cool-RR/pysnooper - https://github.com/andy-landy/traceback_with_variables -- https://mail.python.org/mailman/listinfo/python-list

Re: IDE tools to debug in Python?

2021-01-27 Thread J. Pic
écrit : > > Thank you J. Pic. > > Out of everything today, > (and given my priority is Python/Flask debugging) > it looks like Wing IDE is something to dig into. > > Thanks > > > Sent with ProtonMail Secure Email. > > ‐‐‐ Original Message ‐‐‐ > On Wed

Re: IDE tools to debug in Python?

2021-01-27 Thread J. Pic
Thonny, winpdb/winpdb-rebord, eric4, pudb, web-pdb, vy, mu, netbeans, eclipse, pdbpp... Also see: https://wiki.python.org/moin/PythonDebuggingTools "Changing a variable" -> that's basically evaluating code ? -> supported in all debuggers I suppose -- https://mail.python.org/mailman/listinfo/pyth

Re: Debugging technique

2020-10-05 Thread J. Pic
Another nice debugger feature is to step up with "u", this will take you to the parent frame where you can again inspect the variables. I use this when I want to reverse engineer how the interpreter got to a specific line. Maybe worth mentioning that Werkzeug provides in-browser interactive debug

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
On Wed, Aug 19, 2020 at 3:33 AM Tim Daneliuk wrote: > On 8/18/20 6:34 PM, rmli...@riseup.net wrote: > > I would kindly recommend that folks just educate themselves on what > > ... > > Resources: > > The Invention of the White Race: Volume II: > http://ouleft.org/wp-content/uploads/Invention-White

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
Tim, don't you also think that statements should be backed by evidence, even more if they are particularly accusatory ? We'll be lucky if S&W's editor doesn't sue the PSF for slandering for publishing that S&W "upholds white supremacy". -- https://mail.python.org/mailman/listinfo/python-list

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
On Wed, Aug 19, 2020 at 4:06 PM Ethan Furman wrote: > The purported issue is that Strunk and White itself is doing the upholding. Still trying to find some actual evidence. -- ∞ -- https://mail.python.org/mailman/listinfo/python-list

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
On Wed, Aug 19, 2020 at 3:33 AM Tim Daneliuk wrote: > > I would also like to help you become educated. Be sure to check > out these literary treasures - they are the foundation of the > worldview you are espousing: > > > The_Origin of the Family, Private Property, and the State - Engels > > Das K

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-19 Thread J. Pic
My origins are Jewish Algerian which is just hated by just all parties you could think off, but can not be considered as white. Nonetheless, I'm not angry in any way, rather amused, but still, I don't understand how this sentence (changed by the patch): > When writing English, follow Strunk and W

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-18 Thread J. Pic
I'm sorry Igor, I didn't mean to ruin your "conspiracy theories just hit the commit log day" -- https://mail.python.org/mailman/listinfo/python-list

Re: Final statement from Steering Council on politically-charged commit messages

2020-08-18 Thread J. Pic
I think this commit message is not enough: we should take it further and demand that Elwyn Brooks White choose change their last name to something less supremacist. Also: I've been waiting long enough to see this drama hit the chess world by itself so I'm explicitly making the suggestion here. --

Re: Dowloading package dependencies from locked down machine

2020-07-28 Thread J. Pic
Ideas for solutions: - use pip install --user at home, copy over ~/.local/lib/python3.8/site-packages - same, but with ~/.cache/pip -- https://mail.python.org/mailman/listinfo/python-list

Re: An I connected here?

2020-07-17 Thread J. Pic
And Hollidays ;) Le ven. 17 juil. 2020 à 21:03, Rhodri James a écrit : > On 17/07/2020 19:33, Steve wrote: > > Sorry folks, I really messed that one up. I tried to doctor up a reply > to > > get the address correct but failed to delete enough to own the message... > > Yeah, don't do that. Just

Re: Bulletproof json.dump?

2020-07-07 Thread J. Pic
Try jsonlight.dumps it'll just work. Le mar. 7 juil. 2020 à 12:53, Adam Funk a écrit : > On 2020-07-06, Adam Funk wrote: > > > On 2020-07-06, Chris Angelico wrote: > >> On Mon, Jul 6, 2020 at 10:11 PM Jon Ribbens via Python-list > >> wrote: > > >>> While I agree entirely with your point, there i

Re: Bulletproof json.dump?

2020-07-06 Thread J. Pic
You can achieve round-tripping by maintaining a type mapping in code, for a single datatype it would look like: newloads(datetime, newdumps(datetime.now()) If those would rely on __dump__ and __load__ functions in the fashion of pickle then nested data structures would also be easy: @dataclass c

Re: Bulletproof json.dump?

2020-07-06 Thread J. Pic
Well I made a suggestion on python-ideas and a PyPi lib came out of it, but since you can't patch a lot of internal types it's not so useful. Feel free to try it out: https://yourlabs.io/oss/jsonlight/ -- https://mail.python.org/mailman/listinfo/python-list

Re: I need to study Python

2020-06-26 Thread J. Pic
What happens when people want to start a music instrument and start with pure theory, scales and modes, it's that the instrument ends up in a forgotten corner of the room because they are not having real fun with it. I would like to suggest that you start with a pet project, you can even start wit

Multiple event loops within the same thread ?

2020-06-14 Thread J. Pic
Hi all, It's possible to create several event loops in the same thread by calling asyncio.new_event_loop() Question: is there any use case where that could be useful ? Thank you in advance -- ∞ -- https://mail.python.org/mailman/listinfo/python-list