Comments (4)
The symlink_to()
and hardlink_to()
methods create a symlink or hardlink in the filesystem, but they do not return a Path
object for it. This could be new behavior for a feature enhancement in Python 3.14, but it's not a bug.
from cpython.
pathlib doesn't return self
to facilitate method chaining at the moment. I'd rather not add support because it doesn't seem necessary and complicates the API slightly. But I'll keep an open mind if you'd like to put together a rationale @adventurecomputer!
from cpython.
pathlib doesn't
return self
Maybe returning a Path
is a good idea here, but I don't think returning self
is generally a good idea, unless it's an absolute path. The working directory could change, but for sure the returned Path
should always refer to the symlink or hardlink that was created in the filesystem.
from cpython.
I was testing codellama in my workflow, and this snippet came up as one of the suggestions. It seemed reasonable to assume the pattern of <returned object> = <object>.instance_method()
was being followed and using pydoc the results don't show types of the return, so I assumed this was the case.
from cpython.
Related Issues (20)
- Remove `sqlite3.version` and `sqlite3.version_info`
- GC may have inconsistent view of stacktop with deferred references
- sqlite3: disallow using a sequence of params with named placeholders
- How to handle DECREF_INPUTS_AND_REUSE_FLOAT with deferred floats?
- ChainMap.__contains__ and .get performance improvement. HOT 10
- `PyEval_GetLocals()` leaks locals HOT 1
- Default argument for `__getitem__()` HOT 2
- Python-3.13.0b1 changes behavior on exec() versus Python-3.12 and before ... is it normal ? HOT 6
- uClibc-ng support? HOT 1
- `jit.c` may be built with an incomplete `jit_stencils.h` HOT 4
- Contextvars + async generator + break + finally HOT 3
- Add ISO Basic format support to datetime.isoformat() and date.isoformat() HOT 2
- `asyncio.sslproto._SSLProtocolTransport` can experience invalid state, leading to silent failures. HOT 3
- improvement suggestion for the Coordinate exemple in 3/howto/enum.html HOT 1
- wont let me install because i "cancelled installation"
- Group definition of `os.remove()` & `os.unlink()`
- random.choices undefined behavior when some weights are not finite or negative HOT 2
- Support sharing `NotImplemented` singletons in subinterpreters
- SBOM invalid in https://github.com/python/cpython/blob/main/Misc/sbom.spdx.json HOT 8
- translation error in fr/3/library/argparse.html HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpython.