Raymond Hettinger

@raymondh

Python core developer. Freelance programmer/consultant/trainer. Husband to Rachel. Father to Matthew.

Santa Clara, CA
যোগদান করেছেন মার্চ ২০০৮

টুইট

আপনি @raymondh-কে ব্লক করেছেন

আপনি কি এই টুইটগুলি দেখতে চাওয়ার বিষয়ে নিশ্চিত? টুইটগুলি দেখা হলে @raymondh অবরোধ মুক্ত হবে না।

  1. ১৮ জুলাই

    There are 2 1/2 days left for early bird pricing for the conference in San Francisco on August 17th. The talk schedule is strong this year and includes Lisa Roach and an AI/ML keynote by :-)

    পূর্বাবস্থায়
  2. ১৮ জুলাই

    s/value index value/valid index value/

    এই থ্রেডটি দেখান
    পূর্বাবস্থায়
  3. ১৭ জুলাই

    tip: prefer str.index() over str.find(). The latter returns -1 for missing values. Unfortunately, -1 is also a value index value for non-empty strings.

    এই থ্রেডটি দেখান
    পূর্বাবস্থায়
  4. ১২ জুলাই

    In real code, extracting or stripping the last k characters with slicing uses variables rather than constants, so the actual problematic code is either s[:-k] or s[-k:]. Both of those require special handling for the case where k is zero.

    এই থ্রেডটি দেখান
    পূর্বাবস্থায়
  5. ১২ জুলাই

    The k==0 slicing corner case also arises when stripping the last k characters from a sequence: >>> s = 'abc' >>> s[:-3] # remove the last three '' >>> s[:-2] # remove the last two 'a' >>> s[:-1] # remove the last one 'ab' >>> s[:-0] # oops ''

    এই থ্রেডটি দেখান
    পূর্বাবস্থায়
  6. ১২ জুলাই

    tip: Take care when using slicing to extract the last k elements of a sequence. The k==0 corner case might trip you up! >>> s = 'abc' >>> s[-3:] # last three 'abc' >>> s[-2:] # last two 'bc' >>> s[-1:] # last one 'c' >>> s[-0:] # oops! 'abc'

    এই থ্রেডটি দেখান
    পূর্বাবস্থায়
  7. ১১ জুলাই
    এই থ্রেডটি দেখান
    পূর্বাবস্থায়
  8. ১১ জুলাই

    tip: f-strings parsing is smart enough to handle named unicode code points :-) >>> ordinal, state = 50, "Hawaiʻi" >>> print(f'{ordinal} \N{long rightwards arrow} {state}') 50 ⟶ Hawaiʻi

    এই থ্রেডটি দেখান
    পূর্বাবস্থায়
  9. ৮ জুলাই

    I'm teaching two open-to-the-public workshops at in San Francisco on August 17th. Hope to see you there! * Core Data Structure Master Class * Parsing Clinic: Harvesting data in its many forms

    পূর্বাবস্থায়
  10. ৩ জুলাই

    news: Guido accepted PEP 572. Python now has assignment expressions. if (match := (data)) is not None: print((1)) filtered_data = [y for x in data if (y := f(x)) is not None]

    পূর্বাবস্থায়
  11. ২ জুলাই

    3.7 news, Timsort was sped-up another 40 to 75% for homogenous inputs (just some of the common cases). It replaces Python's slow generic PyObject_RichCompareBool() with a type-specialized comparison function. (Contributed by Elliot Gorokhovsky.)

    পূর্বাবস্থায়
  12. ৩০ জুন

    3.7 was just released. If you want a short tutorial on dataclasses, my Pycon talk will give you quick start:

    পূর্বাবস্থায়
  13. ২৯ জুন

    Another first: Today was my first day to teach a class with Python 3.7 :-)

    পূর্বাবস্থায়
  14. ২৮ জুন

    tip: When replacing one exception with another, use "from None" to suppress exception chaining only when the underlying exception is wrong or misleading in some way. try: f(x) except MisleadingError: raise CorrectError from None

    পূর্বাবস্থায়
  15. ২৮ জুন

    news: Python 3.7 has been released! Guaranteed dict ordering, Dataclasses, Context variables and more.

    পূর্বাবস্থায়
  16. ২৬ জুন

    Examples: def area(r): return math.pi * r**2 def circumference(r): return math.tau * r

    এই থ্রেডটি দেখান
    পূর্বাবস্থায়
  17. ২৬ জুন

    What is your view about having a constant tau equal to 2.0 * pi?

    এই থ্রেডটি দেখান
    পূর্বাবস্থায়
  18. ২৪ জুন

    Learned two new words today: fondant and surd Fondant is the sugary paste used for icing a cake. A surd is an irrational number.

    পূর্বাবস্থায়
  19. ২১ জুন

    Finding the secrets to happiness with machine learning and public datasets.

    পূর্বাবস্থায়
  20. ২০ জুন

    programming tip: Consider a "principle of least force". * Remove line endings with rstrip() instead of strip(). * Use str.replace() instead of re.sub() when the former suffices to get the job done. * Prefer Fabric over Ansible for simple remote management tasks. Etc.

    পূর্বাবস্থায়

লোড হতে বেশ কিছুক্ষণ সময় নিচ্ছে।

টুইটার তার ক্ষমতার বাইরে চলে গেছে বা কোনো সাময়িক সমস্যার সম্মুখীন হয়েছে আবার চেষ্টা করুন বা আরও তথ্যের জন্য টুইটারের স্থিতি দেখুন।

    আপনিও পছন্দ করতে পারেন

    ·