Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
file detection
#6
(Feb-11-2017, 02:42 AM)Skaperen Wrote: but assuming whatever is not int is a file i think is not good enough ... something might succeed with something else.
Why is that not good enough? If it quacks like a duck, treat it like a duck. If it doesn't quack, then just raise an exception.

I also don't understand what you mean about file descriptors. That sounds like C-talk. In Python, it's an object, not a numeric.
Reply


Messages In This Thread
file detection - by Skaperen - Feb-10-2017, 10:36 AM
RE: file detection - by buran - Feb-10-2017, 10:56 AM
RE: file detection - by snippsat - Feb-10-2017, 11:39 AM
RE: file detection - by metulburr - Feb-10-2017, 03:13 PM
RE: file detection - by Skaperen - Feb-11-2017, 02:42 AM
RE: file detection - by micseydel - Feb-11-2017, 03:54 AM
RE: file detection - by Skaperen - Feb-11-2017, 04:58 AM
RE: file detection - by nilamo - Mar-27-2017, 03:16 AM
RE: file detection - by Larz60+ - Mar-27-2017, 03:41 AM
RE: file detection - by wavic - Mar-27-2017, 12:04 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020