19

Python added type annotations, and since they're very new, there are a large number of questions about how to use them. People use different tags to mark these questions:

  1. and (140 questions)
  2. and (63 questions)
  3. (55 questions)
  4. and (49 questions)
  5. and (25 questions)

and occasionally something like (891 questions, almost none of which are about type annotations).

is the most actively used type checker, and all questions are actually just general type annotation questions, not specific to (at least I haven't seen any question specific to mypy extensions).

Should we manually change all these tags to the most popular one ( ) when we see them to make the tagging more consistent?

Too bad synonyms cannot be defined to map a pair of tags into a single tag or vice versa; otherwise we could map everything to the pair.

UPDATE:

I'll wait until Tuesday 4/11 to get any additional comments.

The concerns expressed by @BhargavRao is that automatic retagging will bump the new tag to the home page causing to be flooded with type-related questions. Currently, there are ~2.5 questions updated per minute. I'd retag questions at 1/10th of that rate, or 1 question every 4 minutes. This means retagging will complete within ~1 day (~300 questions total). Of course, I can lower the rate if someone thinks it's too fast.

The script logic I have in mind is:

  • Find all questions that are tagged with any of the tag combinations #2 through #5 (listed above) and that don't have .
  • Every 4 minutes, select one question, and if there's enough tag slots left, add .

I think removing tags is too dangerous, although I'm open to suggestions.

I'll share the script in case anyone wants to run it in the future again.

I hope that Stack Overflow automated tag suggestion system will notice that is used for questions with certain keywords, and will often suggest it for new typing-related questions.

If anyone has any ideas about how to use synonym system to help reduce inconsistent tagging of this topic, maybe add a comment?

EDIT: The retagging started. I removed a few irrelevant questions manually from the queue, and set the earliest allowed date to 2015-01-01 because PEP 484 was all but unknown until then. I also increased the delay to 10 min.

UPDATE: A moderator alerted me to the problem with my script unintentionally converting markdown to the much noisier HTML. I stopped the retagging and rolled back the changes. I do not want to risk automatic retagging again, even after I fix the problem. But if any moderator wants a list of questions that should be retagged, I have it.

8
  • 3
    Unless someone thinks it's a bad idea, I'll update all tags to add type-hinting if any of the other combinations is present.
    – max
    Apr 9, 2017 at 20:02
  • 6
    I'd prefer type-hinting as the docs clearly mention that the module is a support for "type hints". And yes, mass retaging is a bad idea. You'll be bumping the tag to the home page and in the process, annoying multiple users who are following python. Apr 9, 2017 at 20:15
  • 1
    I don't have an opinion about it but I would give it another 24 hours before you start. It is sunday in large parts of the world ....
    – rene
    Apr 9, 2017 at 20:18
  • 1
    @BhargavRao is it ok to do it in small batches?
    – max
    Apr 9, 2017 at 21:21
  • 19
    It's only been a few hours since you posted this proposal. It would be better to wait until you get some feedback from the community before embarking on a retagging project.
    – BJ Myers
    Apr 10, 2017 at 0:38
  • 2
    Community managers have a tool to do batch retagging which does not bump the posts in the process.
    – user4639281
    Apr 11, 2017 at 3:17
  • 1
    @TinyGiant So, should we ask community managers to do this instead of doing it from a user-level script?
    – max
    Apr 11, 2017 at 3:41
  • 5
    If this initiative were to gain widespread support, that would be the least intrusive course of action.
    – user4639281
    Apr 11, 2017 at 3:42

0

You must log in to answer this question.

Browse other questions tagged .