Skip to content
This repository has been archived by the owner on Jul 29, 2023. It is now read-only.

Usage of python f-Strings instead of %-formatting for string formatting #11

Open
algomaster99 opened this issue Feb 16, 2019 · 3 comments
Labels
discussion Open for discussion

Comments

@algomaster99
Copy link
Contributor

Advantages

  1. F-strings are much faster to process than %-formatting.
  2. Remains readable even for longer lines of strings.
  3. Even python-docs recommend to use f-strings since %-formatting support lesser data types. Reference: https://www.python.org/dev/peps/pep-0498/#rationale

Syntax

name = Aman Sharma
f'My name is {name}'
>>> My name is Aman Sharma
@shubhsherl shubhsherl added the discussion Open for discussion label Mar 1, 2019
@Jaya738
Copy link

Jaya738 commented Mar 11, 2019

can I work on this

@Jaya738
Copy link

Jaya738 commented Mar 11, 2019

We have currently deployed rocket chat in our server and I am interested to work on it.

@shubhsherl
Copy link
Owner

Great @Jaya738
Thanks for your interest.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
discussion Open for discussion
Projects
None yet
Development

No branches or pull requests

3 participants