Gary Bernhardt

Results 23 issues of Gary Bernhardt

**Background:** When possible, it's preferable to accept read-only arrays as arguments. That allows upstream callers to pass read-only arrays or regular arrays in. But passing a read-only array in place...

``` Here, d should be the patching dingus: >>> with dingus.patch('__builtin__.file') as d: ... print d ... None ```

Imported from BitBucket: Reported by Gary Bernhardt / garybernhardt, created 6 months ago. A method created with returns= records its calls: >>> d = Dingus(x__returns=5) >>> d.x() 5 >>> d.calls...

Imported from BitBucket: Reported by Anonymous, created 6 months ago. Specifically the syntax that replaces the has_key() method on dictionaries. ``` In [41]: d.has_key('str') Out[41]: In [42]: 'str' in d...

Imported from BitBucket: Reported by Anonymous, created 6 months ago. It doesn't seem possible to have a return element for getitem. For example: ``` from dingus import Dingus d =...

Imported from BitBucket

Imported from BitBucket: Reported by Gary Bernhardt / garybernhardt, created about a year ago. Off the top of my head, this should include file, open, exec, and execfile. There may...

I've seen groups of blank lines appear where they shouldn't be. When I save the file, they move downward for each save. The whole line marking scheme is both slow...

If I say "x = a or b", that's a branch (b might or might not be executed). The script already catches conditionals in ifs, but not outside of them.

Maintaining this documentation as a doctest hasn't turned out very well. Some examples aren't illustrative because they don't represent realistic use cases. Everything is fragile because it's all mixed into...