2to3 does not fix FileType from types Module; no replacement?

mkieverpy at tlink.de mkieverpy at tlink.de
Wed Mar 18 10:55:53 CET 2009

Hello list,

just tried the new 3.1a1 release and its 2to3 script
on a simple program of mine.
The program uses a type check recipe from activestate.
The recipe uses 'types.FileType' which is no longer present
in 'types' in 3.1a1.
2to3 does not fix and gives no warning.

I found these comments in Misc/HISTORY
- Removed all types from the 'types' module that are easily accessable
  through builtins.
- Removed these Python builtins: apply(), callable(), coerce(),
  execfile(), file(), reduce(), reload().

and I could not find a replacement for 'FileType'.
Has this been overlooked?

Found this thread which does not mention FileType:

I guess I just did not see something simple.
Anyone with a hint?

Matthias Kievernagel

More information about the Python-list mailing list