1. Python Cannot Return Multiple Values

    It is often said that Python functions can return multiple values, but this isn't really true. Often the examples given to show Python returning multiple values is something like this:

    def foo():
       return 1, 3
    
    a, b = foo()
    

    But is that really returning multiple values? No. Well then how come …

    Tagged as : development python
  2. du and hard links

    If, like me, you've ever been curious about if/how coreutil's du command handles hard links:

    $ mkdir test
    $ mkdir test/a test/b
    $ dd if=/dev/zero of=test/a/a bs=1M count=1
    1+0 records in
    1+0 records out
    1048576 bytes (1.0 MB, 1.0 …
    Tagged as : unix du coreutils

Page 2 / 3