Skip to content

Soft-deprecate dashes in favor of linestyle #17483

@timhoffm

Description

@timhoffm

dashes are just a more limited form of linestyles. Actually, they are no more than:

    def set_dashes(self, seq):
        if seq == (None, None) or len(seq) == 0:
            self.set_linestyle('-')
        else:
            self.set_linestyle((0, seq))

I propose to soft-deprecate dashes in favor of linestyle. Dashes are redundant and thus only increase the API complexity without any benefit. OTOH I don't think we should deprecate dashes because there might be quite a bit of code out there using it.

Specific actions for this task:

  • linestyle should directly accept a dash pattern. - It currently only accepts (offset, dash_pattern).
  • Change all internal code and examples to use set_linestyle.
  • In set_dashes, recommend to use set_linestyle instead.
  • Add an API change note along the lines.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy