[issue40350] modulefinder chokes on numpy - dereferencing None in spec.loader

2020-10-31 Thread Denis Kasak
Denis Kasak added the comment: Anything still left to do that is stalling this? I just got bitten by it when trying to use modulefinder. -- nosy: +dkasak ___ Python tracker <https://bugs.python.org/issue40

Re: Enumerating all 3-tuples

2018-03-15 Thread Denis Kasak
On 2018-03-13 23:56, Denis Kasak wrote: On 2018-03-10 02:13, Steven D'Aprano wrote: But I've stared at this for an hour and I can't see how to extend the result to three coordinates. I can lay out a grid in the order I want: 1,1,1 1,1,2 1,1,3 1,1,4 ... 2,1,1 2,1,2 2,1,3 2,1,4

Re: Enumerating all 3-tuples

2018-03-14 Thread Denis Kasak
n, m = c(i) return c(n) + (m,) Applying c3 to the natural numbers gives the sequence you wanted: s = map(c3, count(1)) pprint([next(s) for _ in range(10)]) [(1, 1, 1), (2, 1, 1), (1, 1, 2), (1, 2, 1), (2, 1, 2), (1, 1, 3), (3, 1, 1), (1, 2, 2), (2, 1, 3), (1, 1, 4)] -- Denis Kasak -- https://mail.python.org/mailman/listinfo/python-list

Re: Attribute error-- but I'm innocent(?)

2009-03-03 Thread Denis Kasak
with contain a randomByWeight method. In all probability, forename and surname *are* instances of RandomName and contain the randomByWeight() method. -- Denis Kasak -- http://mail.python.org/mailman/listinfo/python-list

Re: Reference or Value?

2009-02-23 Thread Denis Kasak
On Mon, Feb 23, 2009 at 8:41 PM, Christian Heimes li...@cheimes.de wrote: Denis Kasak wrote You could, however, argue that the swap function doesn't work as expected (e.g. from a Pascal or a C++ POV) simply because the underlying objects aren't mutable. The objects *do* get passed

Re: Reference or Value?

2009-02-23 Thread Denis Kasak
On Mon, Feb 23, 2009 at 9:12 PM, Steve Holden st...@holdenweb.com wrote: Denis Kasak wrote: I assure you I am not confused about Python's object model / calling system. I was arguing, from a purely theoretical standpoint, that the same system Python uses could be described in terms of call

Re: Reference or Value?

2009-02-22 Thread Denis Kasak
, it's a rather convoluted way of explaining what happens and calling it pass-by-object feels much better. :-) -- Denis Kasak -- http://mail.python.org/mailman/listinfo/python-list

Re: To unicode or not to unicode

2009-02-22 Thread Denis Kasak
of encodings in existence today, the only real solution to the problem is clearly stating your content-type. Since MIME is the most accepted way of doing this, it should be the preferred way, RFC'ed or not. -- Denis Kasak -- http://mail.python.org/mailman/listinfo/python-list

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Denis Kasak
encode all Unicode code points, while the latter can only encode those in the BMP. -- Denis Kasak -- http://mail.python.org/mailman/listinfo/python-list

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Denis Kasak
- why was UCS-2 chosen over plain UTF-16 or UTF-8 in the first place for Python's internal storage? -- Denis Kasak -- http://mail.python.org/mailman/listinfo/python-list

Re: What encoding does u'...' syntax use?

2009-02-21 Thread Denis Kasak
-size indexing; UTF-16 essentially for the same reason (plus there was no point to UTF-16, since there were no assigned characters outside the BMP). Yes, I failed to realise how long ago the unicode data type was implemented originally. :-) Thanks for the explanation. -- Denis Kasak -- http

Re: time.strptime() and time.strftime() reciprocity

2009-02-16 Thread Denis Kasak
would have also known if you had read the message of the exception more carefully. :P You passed the arguments for strptime() the wrong way around. Just pass them in reverse and your problem will be fixed. -- Denis Kasak -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading text file with wierd file extension?

2009-02-02 Thread Denis Kasak
On Mon, Feb 2, 2009 at 10:43 PM, Lionel lionel.ke...@gmail.com wrote: snip ResourcefilePath 'C:\\C8Example1.slc.rsc' snip C:\C8Example1.slc.src The extension you used in the interactive shell differs from the one you used in the class code (i.e. rsc vs src). -- Denis Kasak -- http

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Denis Kasak
the same error with 2.6 on Windows once you correct this. (note to Giampaolo: sorry, resending this because I accidentally selected reply instead of reply to all) -- Denis Kasak -- http://mail.python.org/mailman/listinfo/python-list

Re: unable to print Unicode characters in Python 3

2009-01-27 Thread Denis Kasak
On Tue, Jan 27, 2009 at 7:08 PM, Thorsten Kampe thors...@thorstenkampe.de wrote: * Denis Kasak (Tue, 27 Jan 2009 14:22:32 +0100) On Tue, Jan 27, 2009 at 1:52 PM, Giampaolo Rodola' gne...@gmail.com wrote: snip print unicode('\u20ac') \u20ac Shouldn't this be print unicode(u'\u20ac

Re: palindrome function

2008-07-12 Thread Denis Kasak
Peter Otten wrote: Denis Kasak wrote: Basically, it reverses the list in place, so it modifies the list which called it. It does not return a /new/ list which is a reversed version of the original, as you expected it to. Since it doesn't return anything explicitly, Python makes it return None

Re: palindrome function

2008-07-11 Thread Denis Kasak
, which is False, naturally. Try this: spam = ['a', 'n', 'n', 'a'] eggs = spam[:] if spam.reverse() == eggs: print Palindrome Also, 'list' is a really bad name for a list, since this is the name of the builtin type object for the list type. -- Denis Kasak -- http://mail.python.org/mailman

Re: Getting a set of lambda functions

2008-05-25 Thread Denis Kasak
reason why it wouldn't work with a loop. Am I missing something? -- Denis Kasak -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a set of lambda functions

2008-05-25 Thread Denis Kasak
see a good reason why it wouldn't work with a loop. Am I missing something? -- Denis Kasak -- http://mail.python.org/mailman/listinfo/python-list

Re: Getting a set of lambda functions

2008-05-25 Thread Denis Kasak
Scott David Daniels wrote: Denis Kasak wrote: ... spam = [] for i in range(10): ... spam.append(lambda: i) spam[0]() 9 spam[1]() 9 Manually creating the lambdas and appending them to a list works as expected, naturally; I don't see a good reason why it wouldn't work with a loop. Am I

Re: type classobj not defined?

2007-01-03 Thread Denis Kasak
'classobj' is not defined You can compare it against the ClassType object located in the types module. import types class b: def __init__(self): self.c = 1 def d(self): print self.c type(b) == types.ClassType True -- Denis Kasak -- http://mail.python.org/mailman/listinfo

Re: Jargons of Info Tech industry

2005-08-26 Thread Denis Kasak
Mike Schilling wrote: Threaded mail-readers too, screen-based editors , spell-checkers, all useless frills. Interestingly enough, I have explained my opinion in the part of the post you have trimmed. On the other hand, things you mentioned are far from being useless. They introduce no

Re: Jargons of Info Tech industry

2005-08-26 Thread Denis Kasak
John Bokma wrote: You can't be sure: errors in the handling of threads can cause a buffer overflow, same for spelling checking :-D Yes, they can, provided they are not properly coded. However, those things only interact locally with the user and have none or very limited interaction with

Re: Jargons of Info Tech industry

2005-08-26 Thread Denis Kasak
John Bokma wrote: Ulrich Hobelmann [EMAIL PROTECTED] wrote: John Bokma wrote: http://www.phpbb.com/mods/ Great. How can I, the user, choose, how to use a mod on a given web server? Ask the admin? And that is, in your opinion, completely comparable to running your own, private

Re: Jargons of Info Tech industry

2005-08-26 Thread Denis Kasak
John Bokma wrote: so use Lynx :-) One forum I visit is about scorpions. And really, it talks a bit easier about scorpions if you have an image to look at :-D. In short: Usenet = Usenet, and www = www. Why some people want to move people from www to Usenet or vice versa is beyond me. If

Re: Jargons of Info Tech industry

2005-08-26 Thread Denis Kasak
T Beck wrote: Wasn't the point... I never said they were. HTML is at version 4.0(I think?) now, AND we've added extra layers of stuff you can use alongside of it. The internet is a free-flowing evolving place... to try to protect one little segment like usenet from ever evolving is just

Re: Jargons of Info Tech industry

2005-08-25 Thread Denis Kasak
CBFalconer wrote: Mike Schilling wrote: Mike Meyer [EMAIL PROTECTED] wrote in message Mike Schilling [EMAIL PROTECTED] writes: l v [EMAIL PROTECTED] wrote in message Xah Lee wrote: (circa 1996), and email should be text only (anti-MIME, circa 1995), I think e-mail should be text only. I

Re: Jargons of Info Tech industry

2005-08-25 Thread Denis Kasak
Mike Schilling wrote: I see a difference between X would be useful for A, B, and C and Y will always be the only proper way. Don't you? Y would not be useful because of the bandwidth it consumes, the malware it would introduce, the additional time spent focusing on the format rather