Python Forum
What is the correct type hint when you want to accept Iterable but not Dictionary
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the correct type hint when you want to accept Iterable but not Dictionary
#5
(Mar-05-2019, 05:42 PM)woooee Wrote:
Quote:but I was given the advice that I should use the abstract version in this case Sequence

Sounds like bad advice. Why did you take it.

See the whole conversation on Reddit.
Reply


Messages In This Thread
RE: What is the correct type hint when you want to accept Iterable but not Dictionary - by LadySvetlana - Mar-05-2019, 07:33 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  accept command line argument mg24 5 1,241 Sep-27-2022, 05:58 PM
Last Post: snippsat
Question how to solve `'TypeError: 'int' object is not iterable`? netanelst 2 1,524 May-24-2022, 12:03 PM
Last Post: deanhystad
  Import a module for use in type hint? Milosz 0 1,455 Nov-08-2021, 06:49 PM
Last Post: Milosz
  Trying to understand how isinstance(values, collections.Iterable) work. quazirfan 7 4,096 Aug-10-2021, 08:10 AM
Last Post: snippsat
  Cannot unpack non-iterable NoneType object, i would like to ask for help on this. Jadiac 3 8,819 Oct-18-2020, 02:11 PM
Last Post: Jadiac
  subprogram issues: cannot unpack non-iterable function object error djwilson0495 13 5,865 Aug-20-2020, 05:53 PM
Last Post: deanhystad
  Why the result of "extended iterable unpacking" with set() is unpredictable? zohanlin 2 2,016 Jun-29-2020, 10:30 AM
Last Post: zohanlin
  TypeError: 're.Match' object is not iterable charlesauspicks 1 11,490 May-25-2020, 06:14 AM
Last Post: bowlofred
  I need my compiled Python Mac app to accept a file as a parameter Oethen 2 2,357 May-10-2020, 05:57 PM
Last Post: Oethen
  function/nonetype object is not iterable nanok66 5 3,966 May-08-2020, 07:39 PM
Last Post: nanok66

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020