Code Monkey home page Code Monkey logo

best-python-cheat-sheet's People

Contributors

kieranholland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

best-python-cheat-sheet's Issues

Regular Expression \d

I felt that your project is wonderful. I created this issue because I thought I could contribute even a little.

About

Python's regex can implements meta characters, but we have to use carefully when using \d, because it includes all of Unicode characters which are in category Nd.
regex - Regular Expression
List of Unicode Characters included group Nd

\d's behavior

ascii mode => [0-9]
non ascii mode => all of characters which in category Nd

For Unicode (str) patterns:
Matches any Unicode decimal digit (that is, any character in Unicode character category [Nd]). This includes [0-9], and also many other digit characters.
Matches [0-9] if the ASCII flag is used.

regex - Regular Expression

Why I created this

I think people who is not accustomed to regex can think it only includes [0-9] by default. However we have to set ascii flag. This is significant when creating validation for user id or password.

Reccomendation

  • Before

\d Decimal digit

  • After

\d Matches any characters in Unicode Number, decimal digit category. This include not only [0-9].

On macOS, Courier New is razor thin and hard to read

On macOS, Courier New is razor thin and hard to read.

You could link the Google WebFont version of Roboto Mono by adding

<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap" rel="stylesheet">

or

<style>
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap')
</style>

to the <head>

NamedTuple notes.

This is an awesome cheet-sheet Very helpful, thank you. I don't think what I've found is a mistake, but maybe a small way to add more info.

The notes on named Tuple call collections.namedtuple. There is a newer typed version of NamedTuple under typing.NamedTuple. I am having a hard time finding the docs.python page for you but I found the dev-docs page for it. Might be worth a look.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.