edit your existing homebrew formula eg.: $rafael: brew edit python3
Change the url version to your desired version, eg: url "https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tar.xz" to url "https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tar.xz"
save with another name, eg: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/python341.rb
** My homebrew directory is : /usr/local/Homebrew/
you can check yours with echo $(brew --repo)
then, install your formula, eg: brew install --debug python341.rb
** --debug is for shows more info in case of errors (and will be)
I have some problems with checksum, then i download the file from url and use shasum to update the formular
shasum -256 $HOME/Downloads/Python-3.6.1.tar.xz
brew switch or ln -s /usr/local/Cellar/python341/3.4.1/bin/python3 /usr/local/bin/python3.4 or ln -s /usr/local/Cellar/python341/3.4.1/Frameworks/Python.framework/Versions/3.4/bin/python3 /usr/local/bin/python3.4
ref.: http://stackoverflow.com/questions/24767286/how-to-install-python-3-3-not-3-4-on-os-x-with-homebrew