Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #90642
| References | <5554c318$0$12999$c3e8da3$5496439d@news.astraweb.com> <mj2g70$eij$1@reader1.panix.com> <55554ddb$0$12995$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmokNo3e1=LEBBnC_6zQmtP=Smh7bXm-uCsGEew4sKZ52Q@mail.gmail.com> |
|---|---|
| Date | 2015-05-14 20:49 -0600 |
| Subject | Re: Survey -- Move To Trash function in Python? |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.22.1431658180.17265.python-list@python.org> (permalink) |
[Multipart message — attachments visible in raw view] - view raw
On May 14, 2015 7:55 PM, "Chris Angelico" <rosuav@gmail.com> wrote: > (Though when > it comes to the bikeshedding phase, I'm sure there'll be some who say > "if it can't be trashed, just hard delete it", and others who say "if > it can't be trashed, raise an exception". And neither is truly wrong.) The answer is "raise an exception". Moving to trash and deleting are different operations, and one shouldn't be substituted for the other any more than a failed attempt to create a hard link should create a soft link instead. If the user wants, they can catch the exception and delete the file instead. Recovering from an accidental deletion would be more difficult.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Survey -- Move To Trash function in Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-15 01:45 +1000
Re: Survey -- Move To Trash function in Python? Grant Edwards <invalid@invalid.invalid> - 2015-05-14 15:49 +0000
Re: Survey -- Move To Trash function in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-15 01:59 +1000
Re: Survey -- Move To Trash function in Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-15 12:28 +1000
Re: Survey -- Move To Trash function in Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-15 11:37 +1000
Re: Survey -- Move To Trash function in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-15 11:53 +1000
Re: Survey -- Move To Trash function in Python? Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-14 20:49 -0600
Re: Survey -- Move To Trash function in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-15 12:56 +1000
Re: Survey -- Move To Trash function in Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-15 14:09 +1000
Re: Survey -- Move To Trash function in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-15 14:25 +1000
Re: Survey -- Move To Trash function in Python? random832@fastmail.us - 2015-05-15 14:27 -0400
Re: Survey -- Move To Trash function in Python? sohcahtoa82@gmail.com - 2015-05-15 17:04 -0700
Re: Survey -- Move To Trash function in Python? Chris Angelico <rosuav@gmail.com> - 2015-05-16 04:33 +1000
Re: Survey -- Move To Trash function in Python? Dave Farrance <DaveFarrance@OMiTTHiSyahooANDTHiS.co.uk> - 2015-05-14 18:32 +0100
Re: Survey -- Move To Trash function in Python? Grant Edwards <invalid@invalid.invalid> - 2015-05-14 18:11 +0000
Re: Survey -- Move To Trash function in Python? Chris Warrick <kwpolska@gmail.com> - 2015-05-14 20:43 +0200
Re: Survey -- Move To Trash function in Python? Ethan Furman <ethan@stoneleaf.us> - 2015-05-14 12:32 -0700
Re: Survey -- Move To Trash function in Python? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-15 12:03 +1000
Re: Survey -- Move To Trash function in Python? Terry Reedy <tjreedy@udel.edu> - 2015-05-14 22:27 -0400
Re: Survey -- Move To Trash function in Python? Ethan Furman <ethan@stoneleaf.us> - 2015-05-14 11:29 -0700
Re: Survey -- Move To Trash function in Python? iMath <redstone-cold@163.com> - 2015-05-18 03:31 -0700
Re: Survey -- Move To Trash function in Python? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-18 14:46 +0100
csiph-web