What does """ do?
Automate the Boring Stuff has a program that changes American dates to European dates. The first part of the code goes:
datePattern = re.compile(r"""\^(.\*?)
#one or two digits for the month
((0|1)?\\d)\-
#one or two dgits for the day
((0|1|2|3)?\\d)\-
#four digits for the year
((19|20)\\d\\d)
#all text after the date
(.\*?)$
""", re.VERBOSE)
I have a pretty vague idea of what everything does except for the r"""\^ part on the first line. what does """ do?
/r/Python
https://redd.it/8pghas
Automate the Boring Stuff has a program that changes American dates to European dates. The first part of the code goes:
datePattern = re.compile(r"""\^(.\*?)
#one or two digits for the month
((0|1)?\\d)\-
#one or two dgits for the day
((0|1|2|3)?\\d)\-
#four digits for the year
((19|20)\\d\\d)
#all text after the date
(.\*?)$
""", re.VERBOSE)
I have a pretty vague idea of what everything does except for the r"""\^ part on the first line. what does """ do?
/r/Python
https://redd.it/8pghas
reddit
r/Python - What does """ do?
3 votes and 1 so far on reddit
Puppy: best friend for your 2025 python projects
TLDR: https://github.com/liquidcarbon/puppy helps you install and manage python projects, environments, and notebook kernels.
# What My Project Does
\- installs python and dependencies, in complete isolation from any existing python on your system
\- `pup add myenv pkg1 pkg2` uses uv to handle projects, packages and virtual environments; `pup list` shows what's already installed
\- `pup clone` and `pup sync` help build environments from external repos with `pyproject.toml` files
\- `import pup; pup.fetch("myenv")` for reproducible, future-proof scripts and notebooks
Puppy works the same on Windows, Mac, Linux (tested with GitHub actions).
Get started (mix and match installer's query params to suit your needs):
curl -fsSL "https://pup-py-fetch.hf.space?python=3.12&pixi=jupyter&env1=duckdb,pandas" | bash
# Target Audience
Loosely defining 2 personas:
1. Getting Started with Python (or herding folks who are):
1. puppy is the easiest way to go from 0 to modern python - one-command installer that lets you specify python version, venvs to build, repos to clone - getting everyone from 0 to 1 in an easy and standardized way
2. if you're confused about virtual environments and notebook kernels, check out
2. Competent - check out Multi-Puppy-Verse and Where
/r/Python
[https://redd.it/1hllr3j
TLDR: https://github.com/liquidcarbon/puppy helps you install and manage python projects, environments, and notebook kernels.
# What My Project Does
\- installs python and dependencies, in complete isolation from any existing python on your system
\- `pup add myenv pkg1 pkg2` uses uv to handle projects, packages and virtual environments; `pup list` shows what's already installed
\- `pup clone` and `pup sync` help build environments from external repos with `pyproject.toml` files
\- `import pup; pup.fetch("myenv")` for reproducible, future-proof scripts and notebooks
Puppy works the same on Windows, Mac, Linux (tested with GitHub actions).
Get started (mix and match installer's query params to suit your needs):
curl -fsSL "https://pup-py-fetch.hf.space?python=3.12&pixi=jupyter&env1=duckdb,pandas" | bash
# Target Audience
Loosely defining 2 personas:
1. Getting Started with Python (or herding folks who are):
1. puppy is the easiest way to go from 0 to modern python - one-command installer that lets you specify python version, venvs to build, repos to clone - getting everyone from 0 to 1 in an easy and standardized way
2. if you're confused about virtual environments and notebook kernels, check out
pup.fetch that lets you build and activate environments from jupyter or any other interactive shell2. Competent - check out Multi-Puppy-Verse and Where
/r/Python
[https://redd.it/1hllr3j
GitHub
GitHub - liquidcarbon/puppy: Your new best friend. Puppy is the easiest way to get started with modern python on any platform…
Your new best friend. Puppy is the easiest way to get started with modern python on any platform, install packages in virtual environments, and contribute to external projects. - liquidcarbon/puppy