The reason I had this marked "# Should never get here" before was that I really, really don't want to return non-ints from this function. I don't want callers to have to check before doing math on the return values. I probably should have had it raise an error instead of returning Nones, even though you "should never get here". I don't think you changed my POSIX code appreciably, but does the Windows part make this any more likely to get here? Under what conditions does GetConsoleScreenBufferInfo return != 0?