All things Python

nedbat,
@nedbat@hachyderm.io avatar

Are you sure you know how decorators work? This should be no problem! 😈 🤯 🤓

e_nomem,
@e_nomem@hachyderm.io avatar

@nedbat It took me a moment to remember that the execution happens at load but yeah, you can do some pretty bonkers stuff with decorators.

brohrer,
@brohrer@recsys.social avatar
villares, Portuguese
@villares@pynews.com.br avatar
hugovk,
@hugovk@mastodon.social avatar

📣🐍📚 Calling all Python library maintainers!

Python 3.13 is now in beta, with the second of four beta releases out later today!

It's now time to start testing your libraries with 3.13 and report any problems back to CPython so they can be fixed before the big October release. And make any updates you need to upgrade your library; keep an eye out for removals and deprecations.

Here's how to test 3.13 on GitHub Actions:

https://dev.to/hugovk/help-test-python-313-14j1

#Python #Python313 #beta #GitHubActions

hynek,
@hynek@mastodon.social avatar

@hugovk My understanding is they already fixed it months ago. Guessing their release process is painful.

cfbolz,
@cfbolz@mastodon.social avatar

@hynek @hugovk I think it's mainly undermaintained (just like everything else) :-(

Posit,
@Posit@fosstodon.org avatar

posit::conf(2024) virtual tickets are now available!
Join us on August 12-14—from all over the world—to live stream the incredible talks and keynotes that will be taking place in Seattle.

We understand that not everyone will be able to make the trip to Seattle this year, so we’re excited to offer a fully virtual offering for everyone as an alternate option.
REGISTER: https://posit.co/conference/

#posit #rstats #python #pydata #DataScience

Posit,
@Posit@fosstodon.org avatar

And if you’re available on June 6, join the Data Science Hangout where you can ask any questions you may have about posit::conf(2024) directly to the conf committee including Hadley Wickham, Posit’s Chief Scientist. https://posit.co/data-science-hangout/

pytexas,
@pytexas@fosstodon.org avatar

Reminder that the PyTexas Meetup is tonight! Come by and chat, hangout, and hear about a journey building an AI app. We'll get started chatting around 7:30pm CST and move on to the main presentation at 8:00pm.

See y'all there!

https://pytexas.org/meetup/join




desertplains,
@desertplains@mastodon.social avatar

I wonder if there's a more efficient way of implementing decimal to #binary conversion in #python

Without recursion, it's ok, but there will be variable assignments operations, which seems to me as something not so efficient, comparing with recursion...

image/png

desertplains,
@desertplains@mastodon.social avatar

@tshirtman @diazona humm interesting. I hope I'm not abusing from your good will but, would you mind to elaborate a bit more, or even send some article for reference? I got curious with the "arbitrarily large numbers". Tks.

tshirtman,
@tshirtman@mas.to avatar

@desertplains
https://docs.python.org/3/library/stdtypes.html#typesnumeric says "Integers have unlimited precision" which is to mean it can use as much memory as needed to store bigger values (until your operating system refuses to give more memory to your process). it's not like the C int type, for example, which will have minimum and maximum possible values.
@diazona

treyhunner, (edited )
@treyhunner@mastodon.social avatar

New article on Python's many command-line tools 📣

Did you know that #Python 3.12 comes bundled with 50 command-line tools? 😮

An HTTP server, a sqlite prompt, a code profiler, and so much more! ✨

https://pym.dev/cli-tools/

treyhunner,
@treyhunner@mastodon.social avatar

@hugovk Ooh! I missed this new feature!

This one actually seems really handy 💖

$ python3.13 -m random 6
1
$ python3.13 -m random 3.14159
3.0145311549545397
$ python3.13 -m random this is great
is

I will definitely be updating this article before October. 😁

sonicrocketman,
@sonicrocketman@mastodon.social avatar

@treyhunner Congrats on making HN! Very useful stuff. I use http.server and sqlite a lot. Some are new to me though.

villares, Portuguese
@villares@pynews.com.br avatar
cheukting_ho,
@cheukting_ho@fosstodon.org avatar

Hey, do you want to vote in the upcoming @ThePSF elections? Don't forget to affirm your intention to vote (please check your email, including spam). Deadline: June 25th 2024. Not a member yet? Check how you can become a voting member here: https://buff.ly/3X2cLhL #Python

leahawasser,
@leahawasser@fosstodon.org avatar

I wrote an overview of @pyOpenSci s second (and my second) experience at https://www.pyopensci.org/blog/recap-pyos-pyconus-2024.html

we had a great time with a record amount of sprinters, open space attendees AND i gave my first talk! I can't wait for next year!

Jigsaw_You,
@Jigsaw_You@mastodon.nl avatar

NumPy 2.0 is planned to be released on June 16, 2024. 👍

https://numpy.org/devdocs/release/2.0.0-notes.html

flypig,
@flypig@mastodon.social avatar

The #ResearchEngineering and #ToolsPracticesSystems teams from #TheAlanTuringInstitute wrote up about our experiences at #FOSDEM2024 ... we talk about #OpenResearch, #Python, #HPC and #LinuxOnMobile. Happy memories! #FOSDEM

https://medium.com/

pyconau,
@pyconau@mastodon.pycon.org.au avatar

🎤 Ready to take your public speaking skills to the next level? PyCon AU has your back!

Whether you're a Student, Educator, Graduate, or Professional, we want YOU! We're seeking talks from first-time or seasoned speakers, and we have a fantastic mentoring program to help your proposal shine.

Read more about it here: pycon.org.au/program/-and-feedback

webknjaz,
@webknjaz@mastodon.social avatar

One friend of mine wrote a blog post on his @homeassistant setup:

"Home Assistant helps me survive during missile and drone attacks. Here is how." https://denysdovhan.com/home-assistant-config/config/war/

saving lives IRL y'all!

jscholes,
@jscholes@dragonscave.space avatar

Needed to rename a test fixture in a #Python file, and find/replace wasn't up for the job. So I decided to give #VSCode a go:

I started by pressing Ctrl+F2, for "Change All Occurrences". I think that is basically find/replace, and hence didn't do what I wanted.

Instead, I installed the recommended Python extension, and pressed F2 for "Rename Symbol". That claims to have only made one change, and the references to the function are still using the old name.

So, consider me confused. I'm using #pytest, whereby the test fixtures are referenced as function arguments rather than being called directly. Maybe that's what VS Code is struggling with? Either way, I've now spent more time on this than just manually editing the text.

#VisualStudioCode

nedbat,
@nedbat@hachyderm.io avatar

@jscholes Pytest's style of associating fixtures with tests is quirky, and confuses most language tooling.

nedbat,
@nedbat@hachyderm.io avatar

@mdione @jscholes "Change all occurrences" is using language-specific semantics to find uses of a variable. Here is a function called fx, but it's never used:

def fx(): return 17

def other_func(fx): return fx+1

print(other_func(12)) # 13

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • mdbf
  • rosin
  • everett
  • cisconetworking
  • love
  • Youngstown
  • slotface
  • Durango
  • ngwrru68w68
  • kavyap
  • tacticalgear
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Leos
  • cubers
  • modclub
  • InstantRegret
  • ethstaker
  • osvaldo12
  • GTA5RPClips
  • khanakhh
  • anitta
  • provamag3
  • normalnudes
  • tester
  • megavids
  • JUstTest
  • All magazines