Skip to content

Commit bc3562e

Browse files
authored
Update README.md
1 parent 7b05a32 commit bc3562e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Python implementation of the C# nameof operator
1+
# `python-nameof`: a Python implementation of the useful C# `nameof` operator
22

3-
python-nameof
4-
=============
3+
A Python utility that mimics the [C# `nameof` operator](https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/nameof?redirectedfrom=MSDN), allowing you to get variable, attribute, or property names as strings at runtime.
54

6-
A Python utility that mimics the C# `nameof` operator, allowing you to get variable, attribute, or property names as strings at runtime.
5+
It is an essential operator to allow flexible and reliable refactoring, among [many other things](https://stackoverflow.com/q/31695900/3873799).
76

8-
It supports string interpolation, so it's easier to reference variable names when logging, allowing for easier and more robust refactoring.
7+
This implementation supports string interpolation, so it's easy to reference variable names when logging, e.g.
8+
`log.error(f"{nameof(somevariable)} is incorrect")`.
99

1010
## Installation
1111

0 commit comments

Comments
 (0)