I recently read the following line of code:
use fmt::{self, Debug};
What does the self
keyword in the above statement mean?
noun, plural paths [pathz, pahthz, paths, pahths]. a way beaten, formed, or trodden by the feet of persons or animals. a narrow walk or way: a path through a garden; a bicycle path. a route, course, or track along which something moves: the path of a hurricane.
countable noun. A path is a long strip of ground which people walk along to get from one place to another. We followed the path along the clifftops.
path module is a very extensively used module that is handy when processing files from different places in the system. It is used for different purposes such as for merging, normalizing and retrieving path names in python . All of these functions accept either only bytes or only string objects as their parameters.
-path- comes from Greek, where it has the meaning "suffering; disease; feeling. '' This meaning is found in such words as: antipathy, apathetic, apathy, empathy, homeopathy, pathetic, pathology, pathos, psychopath, sympathetic, sympathize, sympathy, telepathy.
self
here refers to the module itself, i.e. your line is equivalent to the two lines
use fmt::Debug;
use fmt;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With