Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CPPAdvanced CPPAdvanced
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

Diese GitLab Instanz ist nicht f眉r den produktiven Einsatz gedacht!
Bitte https://gitlab.ost.ch benutzen!
Diese Instanz ist nur nuch zur Datenmigration online.

Vielen Dank f眉r euer Verst盲ndnis.

  • Thomas Corbat
  • CPPAdvancedCPPAdvanced
  • Merge requests
  • !8

Open
Created May 16, 2019 by Florian Bruhin@The-CompilerContributor
  • Report abuse
Report abuse

More idiomatic Python

  • Overview 0
  • Commits 2
  • Changes 1

FWIW, I'm not convinced whether the check is needed at all - but if it is there, isinstance is the thing to use 馃槈

As for not needing it at all: Duck typing would be enough - all we expect is a thing having an .encode('utf-8') method which returns a bytes object. This could be a string, but it could (in theory) as well be some user-defined object.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: patch-1