[issue22116] Weak reference support for C function objects

2014-08-02 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22116 ___ ___ Python-bugs

[issue13272] 2to3 fix_renames doesn't rename string.lowercase/uppercase/letters

2014-07-27 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13272 ___ ___ Python-bugs

[issue19771] runpy should check ImportError.name before wrapping it

2013-12-29 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19771 ___ ___ Python-bugs

[issue5038] urrlib2/httplib doesn't reset file position between requests

2013-03-30 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5038 ___ ___ Python-bugs

[issue935117] pkgutil doesn't understand case-senseless filesystems

2013-03-28 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue935117 ___ ___ Python-bugs

Looking for pointers/suggestion - how to make a webbrowser with these restriction?

2012-09-26 Thread Anthony Kong
Hi, all, It is kind of a MacGyver question. I am just looking for some general suggestions/pointer. First let me first describe the development environment I am in: it is a locked down WinXP PC with limited development tools and libraries. At my disposal I have python 2.6 , webkit 5.33 dll,

Re: Looking for pointers/suggestion - how to make a webbrowser with these restriction?

2012-09-26 Thread Anthony Kong
Hi, Chris, Thanks for your reply. I really do not have any requirement. It is more a curiosity question (not work related). I'd like to find out how python can be used to 'glue' all these moving parts together. Performance and security are definitely not a concern as it is just a toy

[issue4188] test_threading hang when running as verbose

2012-09-13 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4188 ___ ___ Python-bugs

[issue13241] llvm-gcc-4.2 miscompiles Python (XCode 4.1 on Mac OS 10.7)

2012-06-27 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13241 ___ ___ Python-bugs

[issue14838] IDLE Will not load on reinstall

2012-05-17 Thread Anthony Kong
Anthony Kong anthony.hw.k...@gmail.com added the comment: Which os? windows or linux or osx? It actually sounds like a support question. You probably should take the question to the python newsgroup (https://groups.google.com/forum/?fromgroups#!forum/comp.lang.python). -- nosy

[issue14658] Overwriting dict.__getattr__ is inconsistent

2012-04-24 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14658 ___ ___ Python-bugs

[issue14399] zipfile and creat/update comment

2012-03-26 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14399 ___ ___ Python-bugs

[issue13641] decoding functions in the base64 module could accept unicode strings

2011-12-28 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13641 ___ ___ Python-bugs

Design Pattern and Python: Any book recommendation? Your view?

2011-11-03 Thread Anthony Kong
Sorry to resurrect this topic. By google search the last discussion was in 2003. I would like to find out what is the current prevailing view or consensus (if any) on the use of Design Pattern in python? I am doing some 'fact-finding' in this area on request of my colleagues. Some of them

[issue12853] global name 'r' is not defined in upload.py

2011-08-29 Thread Anthony Kong
Changes by Anthony Kong anthony.hw.k...@gmail.com: -- nosy: +Anthony.Kong ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12853 ___ ___ Python-bugs

Re: Aw: Re: Aw: Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-18 Thread Anthony Kong
Thanks for all the great suggestion. First of all, Carl is right that it does not take much to impress a java programmer about the expressiveness of functional programming. Covered map, reduce and filter as Rainer suggested. Emphasized the advantages of functional style as summarised by Steve

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-13 Thread Anthony Kong
Thanks, mate! I was writing that up really late at night. Somehow I changed term to semi-colon half way through, Cheers On Wed, Jul 13, 2011 at 5:36 PM, Thorsten Kampe thors...@thorstenkampe.dewrote: * Dave Angel (Mon, 11 Jul 2011 10:36:48 -0400) On 01/-10/-28163 02:59 PM, Anthony Kong wrote

Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-13 Thread Anthony Kong
Hi, all, If you have read my previous posts to the group, you probably have some idea why I asked this question. I am giving a few presentations on python to my colleagues who are mainly java developers and starting to pick up python at work. personal opinion So I have picked this topic for one

Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-13 Thread Anthony Kong
(My post did not appear in the mailing list, so this is my second try. Apology if it ends up posted twice) Hi, all, If you have read my previous posts to the group, you probably have some idea why I asked this question. I am giving a few presentations on python to my colleagues who are mainly

Re: Functional style programming in python: what will you talk about if you have an hour on this topic?

2011-07-13 Thread Anthony Kong
Hi, James, You might also want to cover gotchas like Python's references. Not sure what it means in the context of functional programming. If you can give some code to demonstrate, it will be great. Cheers -- Tony Kong *blog:* www.ahwkong.com Don’t EVER make the mistake that you can

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Anthony Kong
One of the main difference is that pypy supports only R-Python, which stands for 'Restricted Python. It is a subset of C-python language. See here for more info: http://codespeak.net/pypy/dist/pypy/doc/coding-guide.html#rpython-definition-not Cheers On Thu, Jul 14, 2011 at 12:06 AM, ArrC

Re: What is the difference between PyPy and Python? are there lot of differences?

2011-07-13 Thread Anthony Kong
I stand corrected. Thanks Ian Cheers On Thu, Jul 14, 2011 at 1:18 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Wed, Jul 13, 2011 at 8:19 AM, Anthony Kong anthony.hw.k...@gmail.com wrote: One of the main difference is that pypy supports only R-Python, which stands for 'Restricted Python

An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Anthony Kong
Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up which will require the use of python. One of my colleague asked an interesting: *If Python use indentation to denote scope, why it still needs semi-colon at the end of

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Anthony Kong
Awesome! Thanks for blog post link Cheers On Tue, Jul 12, 2011 at 12:16 AM, Thomas Jollans t...@jollybox.de wrote: On 07/11/2011 03:51 PM, Anthony Kong wrote: Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up

My take on 'Python Productivity tip for Java Programmer'. Could you give me more feedback?

2011-07-11 Thread Anthony Kong
Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up which will require the use of python. One of the goals of the presentations, as told by the 'sponsor' of the presentation, is to help the existing Java/Excel VBA

Re: An interesting beginner question: why we need colon at all in the python language?

2011-07-11 Thread Anthony Kong
/-28163 02:59 PM, Anthony Kong wrote: Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up which will require the use of python. One of my colleague asked an interesting: *If Python use indentation to denote scope, why

Property setter and lambda question

2011-07-11 Thread Anthony Kong
Hi, all, This question is in the same context of my two earlier questions. This question was raised by some python beginners, and I would like to check with the list to ensure I provide a correct answer. Here is a code snippet I used to demonstrate the keyword *property*: class A(object):

Re: My take on 'Python Productivity tip for Java Programmer'. Could you give me more feedback?

2011-07-11 Thread Anthony Kong
: On 07/11/2011 05:07 PM, Anthony Kong wrote: Hi, all, Lately I am giving some presentations to my colleagues about the python language. A new internal project is coming up which will require the use of python. One of the goals of the presentations, as told by the 'sponsor

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
...@jollybox.de wrote: On 07/11/2011 05:54 PM, Anthony Kong wrote: Hi, all, This question is in the same context of my two earlier questions. This question was raised by some python beginners, and I would like to check with the list to ensure I provide a correct answer. Here is a code

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
Good point! Need to get my terminology right. Thanks On Tue, Jul 12, 2011 at 2:43 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Jul 11, 2011 at 9:54 AM, Anthony Kong anthony.hw.k...@gmail.com wrote: Hi, all, This question is in the same context of my two earlier questions

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
PS: are you sure the lambda self: self.__foo() trick works, with subclasses or otherwise? I haven't tested it, and I'm not saying it doesn't, but I have a feeling double-underscore name mangling might be a problem somewhere down the line? Awesome, Thomas. The trick only works if there is

Re: Property setter and lambda question

2011-07-11 Thread Anthony Kong
at 3:41 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Mon, Jul 11, 2011 at 11:21 AM, Anthony Kong anthony.hw.k...@gmail.com wrote: Awesome, Thomas. The trick only works if there is only one leading underscore in the method names. The following example works as I expected for the derived class

Question about compiling python 30 from subversion repository on OSX

2011-04-23 Thread Anthony Kong
Hi, all, I have checked out source code from this url http://svn.python.org/projects/python/branches/py3k, then run ./configure --with-universal-archs=64-bit make First of all, I got this message: --- Modules/Setup.dist is newer than Modules/Setup;