Skip to content

Instantly share code, notes, and snippets.

View kurt-krueckeberg's full-sized avatar

Kurt Krueckeberg kurt-krueckeberg

View GitHub Profile
@kurt-krueckeberg
kurt-krueckeberg / hack-splfileojbect
Last active August 29, 2015 14:23
Errors when using SplFileObject in a Hack class
<?hh
function test_splfile(string $file_name) : void
{
$file1 = new SplFileObject($file_name);
// These loops work fine
foreach ($file1 as $line_number => $text) { /* hhvm: Could not find method key in an object of
type SplFileObject Typing[4053]) */
echo $text . "\n" . $line_number;
}
#!/usr/bin/python
# _*_ coding: latin1 _*_
"""This is Textile
A Humane Web Text Generator
TODO:
* Make it work with Python 2.1.
* Make it work with Python 1.5.2? Or that's too optimistic?