GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Notices by Trey Hunner ? (treyhunner@mastodon.social)

  1. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Wednesday, 01-Jan-2025 06:20:11 JST Trey Hunner ? Trey Hunner ?

    @datamancer I'd make them two separate functions if you find yourself particularly wanting both styles.

    You could even get fancy and attach one function as an attribute of the other like itertools.chain and itertools.chain.from_iterable (technically chain is a implement as a class but the same could work for functions).

    In conversation about 5 months ago from mastodon.social permalink
  2. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Saturday, 14-Dec-2024 04:51:39 JST Trey Hunner ? Trey Hunner ?

    Learning a new skill? I bet you're making 2 big mistakes.

    1. You're focusing too much on consuming information
    2. You're not focusing enough on repetition

    I notice new Python learners falling into this trap. It's a big problem with the resources we use to learn and the way we talk about and use those resources.

    🧵

    #learning #teaching #Python

    In conversation about 6 months ago from mastodon.social permalink
  3. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Wednesday, 09-Oct-2024 10:47:31 JST Trey Hunner ? Trey Hunner ?

    Context managers define an entrance step and an exit step which are run automatically when the "with" block is entered and exited.

    Read more 👉 https://trey.io/meA1Mx

    #Python

    In conversation about 8 months ago from mastodon.social permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: pythonmorsels.s3.amazonaws.com
      What is a context manager?
      from @treyhunner
      Context managers power Python's with blocks. They sandwich a code block between enter code and exit code. They're most often used for reusing common cleanup/teardown functionality.
  4. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Saturday, 07-Sep-2024 03:48:08 JST Trey Hunner ? Trey Hunner ?

    Another introductory #Python video: creating Python programs.

    Toward the end I briefly address something I see new Python users struggle with all the time: the difference between the REPL and your system's command line.

    >>> python3 my_program.py

    https://www.pythonmorsels.com/creating-python-programs/

    In conversation about 9 months ago from mastodon.social permalink
  5. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Friday, 06-Sep-2024 06:16:58 JST Trey Hunner ? Trey Hunner ?

    There's no actual "containment" in Python, just containment of pointers.

    Read more 👉 https://trey.io/uvntzs

    #Python

    In conversation about 9 months ago from mastodon.social permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: pythonmorsels.s3.amazonaws.com
      Data structures contain pointers
      from @treyhunner
      Data structures, like variables, contain references to objects, rather than the objects themselves.
  6. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Sunday, 21-Jul-2024 11:32:36 JST Trey Hunner ? Trey Hunner ?

    If Octavia Butler's Parable of The Sower has been on your to-read list, today's a good day to start it.

    The book begins on July 20, 2024 in Los Angeles exurbs.

    The series involves a pandemic with a xenophobic president running on the slogan "make America great again" and the president neither admonishes nor directly supports his religious extremist supporters.

    Butler's future isn't our present, but there's some eerie echos. 😬

    Happy(?) Parable of The Sower Day

    In conversation about 10 months ago from mastodon.social permalink
  7. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Friday, 12-Jul-2024 01:10:46 JST Trey Hunner ? Trey Hunner ?

    Announcing a new #Python-powered terminal program: utf-cli. 📣

    Run "utf" to launch a sort of local search engine for Unicode characters (I've mostly been using it for emoji characters). ✨

    https://pypi.org/project/utf-cli/

    In conversation about 11 months ago from mastodon.social permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: pypi.org
      utf-cli
      None
  8. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Wednesday, 10-Jul-2024 23:48:47 JST Trey Hunner ? Trey Hunner ?

    An "if" statement can have any number of "elif" statements after it (including none at all) and it can optionally have a single "else" statement at the end.

    Read the full article: Python's "if" statements
    ▸ https://trey.io/ZfjAHe

    #Python

    In conversation about 11 months ago from mastodon.social permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: pythonmorsels.s3.amazonaws.com
      Python's "if" statement
      from @treyhunner
      You can use Python's if, elif, and else blocks to run code only when specific conditions are met.
  9. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Wednesday, 22-May-2024 03:24:37 JST Trey Hunner ? Trey Hunner ?
    • Yngve Mardal Moe
    • Marie Roald

    Guess which Norwegian, needleworking, library-indexing, BeeWare contributing folks are now on Mastodon in preparation for a future Python conference. 🇳🇴🧵📚🐝

    @yngvem & @marieroald!

    #PyConUS

    In conversation about a year ago from mastodon.social permalink
  10. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Thursday, 02-May-2024 06:39:46 JST Trey Hunner ? Trey Hunner ?
    • Buttondown
    • PyCon US

    @buttondown will you have a booth at @pycon? I'm curious to know how Buttondown compares to my current email/newsletter setup and would love to chat with folks in-the-know.

    Regardless of whether you'll have a booth, thank you for sponsoring! 💖

    In conversation about a year ago from mastodon.social permalink
  11. Embed this notice
    Trey Hunner ? (treyhunner@mastodon.social)'s status on Wednesday, 20-Mar-2024 03:47:53 JST Trey Hunner ? Trey Hunner ?

    My students often ask me whether they can see a list of every dunder method that #Python has. I've been meaning to compile a categorized list for years.

    I finally did it.

    Here's every dunder method in Python... all 115 of them! 🤯

    https://pym.dev/every-dunder-method/

    In conversation about a year ago from mastodon.social permalink

User actions

    Trey Hunner ?

    Trey Hunner ?

    Python & #Django trainerI help folks sharpen their Python skills with https://PythonMorsels.com??#pythonoddityI'm trying to eat more ethicallyhe/him

    Tags
    • (None)

    Following 0

      Followers 0

        Groups 0

          Statistics

          User ID
          89351
          Member since
          18 Jan 2023
          Notices
          11
          Daily average
          0

          Feeds

          • Atom
          • Help
          • About
          • FAQ
          • TOS
          • Privacy
          • Source
          • Version
          • Contact

          GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

          Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.