[Python-Dev] Question

2012-08-03 Thread Dheeraj Goswami
Hi Python Gurus,
I am an experienced Java developer and have been working on it for about 8 
years. I need to build a web 2.0/AJAX based website/application and I am 
thinking to build it in Django which means I need to learn and move to Python.

Please advise is it really worth moving from Java world into Python world? Will 
it really be fun to build in Django.

PS: I dont like magics so I will never use Ruby/Rails as I am not that kind of 
guy.

cheers
/Dg___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Question

2012-08-03 Thread MRAB

On 03/08/2012 19:53, Dheeraj Goswami wrote:

Hi Python Gurus,
I am an experienced Java developer and have been working on it for about
8 years. I need to build a web 2.0/AJAX based website/application and I
am thinking to build it in Django which means I need to learn and move
to Python.

Please advise is it really worth moving from Java world into Python
world? Will it really be fun to build in Django.

PS: I dont like magics so I will never use Ruby/Rails as I am not that
kind of guy.


This list is for the development _of_ Python, not development _with_
Python.

Please post to [email protected] instead.
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Question

2012-08-03 Thread Chris Angelico
On Sat, Aug 4, 2012 at 4:53 AM, Dheeraj Goswami
 wrote:
> Hi Python Gurus,
> I am an experienced Java developer and have been working on it for about 8
> years. I need to build a web 2.0/AJAX based website/application and I am
> thinking to build it in Django which means I need to learn and move to
> Python.
>
> Please advise is it really worth moving from Java world into Python world?
> Will it really be fun to build in Django.

This list is more about the development _of_ Python rather than
development _with_ Python. You'll get more responses on
[email protected] instead.

But I would say that yes, it IS worth moving from Java to Python. If
nothing else, learning more languages is always advantageous!

Chris Angelico
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] issue 15510: textwrap.wrap() returning empty list

2012-08-03 Thread Chris Jerdonek
I would like people's opinions on issue 15510, specifically whether it
should be addressed and in what versions:

http://bugs.python.org/issue15510

Jesús suggested that I ask.  The issue relates to textwrap.wrap()'s
behavior when wrapping strings that contain no non-whitespace
characters -- in particular the empty string.

Thanks,
--Chris
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] issue 15510: textwrap.wrap() returning empty list

2012-08-03 Thread MRAB

On 03/08/2012 21:46, Chris Jerdonek wrote:

I would like people's opinions on issue 15510, specifically whether it
should be addressed and in what versions:

http://bugs.python.org/issue15510

Jesús suggested that I ask.  The issue relates to textwrap.wrap()'s
behavior when wrapping strings that contain no non-whitespace
characters -- in particular the empty string.


If you don't want the empty list, you could just write:

wrap(text) or ['']

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Understanding the buffer API

2012-08-03 Thread Jeff Allen
I'm implementing the buffer API and some of memoryview for Jython. I 
have read with interest, and mostly understood, the discussion in Issue 
#10181 that led to the v3.3 re-implementation of memoryview and 
much-improved documentation of the buffer API. Although Jython is 
targeting v2.7 at the moment, and 1-D bytes (there's no Jython NumPy), 
I'd like to lay a solid foundation that benefits from the recent CPython 
work. I hope that some of the complexity in memoryview stems from legacy 
considerations I don't have to deal with in Jython.


I am puzzled that PEP 3118 makes some specifications that seem 
unnecessary and complicate the implementation. Would those who know the 
API inside out answer a few questions?


My understanding is this: When a consumer requests a buffer from the 
exporter it specifies using flags how it intends to navigate it. If the 
buffer actually needs more apparatus than the consumer proposes, this 
raises an exception. If the buffer needs less apparatus than the 
consumer proposes, the exporter has to supply what was asked for.  For 
example, if the consumer sets PyBUF_STRIDES, and the buffer can only be 
navigated by using suboffsets (PIL-style) this raises an exception. 
Alternatively, if the consumer sets PyBUF_STRIDES, and the buffer is 
just a simple byte array, the exporter has to supply shape and strides 
arrays (with trivial values), since the consumer is going to use those 
arrays.


Is there any harm is supplying shape and strides when they were not 
requested? The PEP says: "PyBUF_ND ... If this is not given then shape 
will be NULL". It doesn't stipulate that strides will be null if 
PyBUF_STRIDES is not given, but the library documentation says so. 
suboffsets is different since even when requested, it will be null if 
not needed.


Similar, but simpler, the PEP says "PyBUF_FORMAT ... If format is not 
explicitly requested then the format must be returned as NULL (which 
means "B", or unsigned bytes)". What would be the harm in returning "B"?


One place where this really matters is in the implementation of 
memoryview. PyMemoryView requests a buffer with the flags PyBUF_FULL_RO, 
so even a simple byte buffer export will come with shape, strides and 
format. A consumer (of the memoryview's buffer API) might specify 
PyBUF_SIMPLE: according to the PEP I can't simply give it the original 
buffer since required fields (that the consumer will presumably not 
access) are not NULL. In practice, I'd like to: what could possibly go 
wrong?


Jeff Allen

___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com